I had some errors in my dbcc checkdb output. Can I safely run this again with the repair_allow_data_loss option? What does this do?

more ▼

asked Nov 10, 2009 at 11:18 AM in Default

avatar image

Steve Jones - Editor ♦♦
5.2k 79 94 87

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

stolen from SQLTeam.com but;

1) I strongly advise not running repair if at all possible. The REPAIR_ALLOW_DATA_LOSS option is deliberately named that because it usually requires deleting data to obtain structural consistency of the database. Its far better to try to understand what the errors mean and the consequences of running repair are. The latest BOL update has full information for all errors that CHECKDB returns, including what repair will do. You should also strive to work out why these errors occured.

2) Running repair should be the last thing tried to recover from errors. Its always better to recover using up-to-date backups and/or extracting as much data as possible before running repair/restoring.

more ▼

answered Nov 10, 2009 at 11:44 AM

avatar image

Christopher Klein
101 1 2 3

(comments are locked)
10|1200 characters needed characters left

I'd recommend reading Paul Randal's blog post that covers REPAIR_ALLOW_DATA_LOSS and what it does:

Corruption: Last Resorts that people try first...

more ▼

answered Dec 06, 2009 at 01:22 AM

avatar image

Jonathan Kehayias
293 1 3 6

Yep, 'last resort' says it all, really.

Dec 07, 2009 at 05:01 AM David Wimbush
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Nov 10, 2009 at 11:18 AM

Seen: 3482 times

Last Updated: Nov 10, 2009 at 11:18 AM

Copyright 2018 Redgate Software. Privacy Policy