x
login about faq Site discussion (meta-askssc)

DBCC tells me to run with repair_allow_data_loss

I took over a database that had no maintenance jobs other than backups being done. I immediately restored the oldest backup (7 days ago) to another name and ran DBCC CHECKDB on it. It has the same number of errors and recommendation to run with repair.

My question is what exactly is going to potentially be lossed. The error is an allocation error. Does that mean my data is ok, just an allocation is messed up?

Thanks for any help.

Running on MSSQL 2005 SP3

_____________UPDATE I have ran the repair on my restored copy of the database. Doing a row count on the table that had the error from production to the test copy gave me the same results. Is there something else I should compair? I am doing another dbcc checkdb on the database since the repair finished.

more ▼

asked Sep 14 '10 at 06:52 PM in Default

sqlnubi gravatar image

sqlnubi
845 4 5 6

A simple rowcount may not show up data loss, try something like RedGate SQL Data Compare or Tablediff (http://msdn.microsoft.com/en-us/library/ms162843.aspx) to see what differences there are in the data, if any.

Sep 15 '10 at 06:57 AM WilliamD
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Have you run it with repair on the test copy? I think I would run it there and see what the results are like. You can get a chance to compare the test to the live data and see if anything crucial changes are made. If you can identify the changes then you can choose whether to run it on live. A great resource for DBCC CHECKDB is Paul Randall's site www.sqlskills.com so go and read up all about the options that are available with that command.

more ▼

answered Sep 14 '10 at 11:30 PM

Fatherjack gravatar image

Fatherjack ♦♦
38.8k 55 69 104

+1 for testing the repair on a test instance.

@sqlnubi - just remember, REPAIR_ALLOW_DATA_LOSS can cause you to lose data (surprise, surprise!) - some people seem to not (want) to understand that fact and are surprised when data goes missing.

Sep 14 '10 at 11:57 PM WilliamD
(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

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1834
x45

asked: Sep 14 '10 at 06:52 PM

Seen: 1072 times

Last Updated: Sep 15 '10 at 05:47 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.