x

What does DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS do?

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

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 77 79 82

(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

Christopher Klein gravatar image

Christopher Klein
101 2

(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

Jonathan Kehayias gravatar image

Jonathan Kehayias
283 1 1 2

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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

SQL Server Central

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

Topics:

x126
x47
x19

asked: Nov 10, 2009 at 11:18 AM

Seen: 3127 times

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