x
login about faq Site discussion (meta-askssc)

If DBCC CHECKDB shows my database is corrupted, how do I know when it became corrupted?

I created a job that runs daily (every midnight) that uses DBCC CHECKDB on every database. Every day in the morning I launch SSMS to look at the logs and hope to see CHECKDB found 0 allocation errors lines.

But if I pass some days without checking the logs and discover that some database is corrupted, how can I know when the corruption ocurred to restore the backups from that point in time?

more ▼

asked Feb 25 '10 at 09:44 PM in Default

4efe27c0 gravatar image

4efe27c0
85 2 2 3

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

1 answer: sort voted first

Check in the table msdb.dbo.suspect_pages. It has useful information about which pages are suspect, although the date in there shows you when it was last seen to be suspect, which isn't exactly what you want.

Have a look at what type of page it is that's corrupt. If it's a page for a nonclustered index page, then just rebuild the index. If it's a table, then do a page level restore. You will know straight away if you restore that page from a backup where it's also corrupt, because the restore will fail.

Your best bet is really to look at your history of DBCC results.

more ▼

answered Feb 26 '10 at 12:29 AM

Rob Farley gravatar image

Rob Farley
5.7k 13 17 19

(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:

x67
x45
x16

asked: Feb 25 '10 at 09:44 PM

Seen: 1593 times

Last Updated: Feb 26 '10 at 05:34 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.