August 11, 2015 at 8:28 pm
Hello all,
I am in need of help.
We are running SQL 2008 R2 with a database in 2000 compatibility mode.
Every 2 Weeks I run DBCC checkdb
In the past DBCC Checkdb reported no errors.
Today, I ran checkdb and it reported the following error.
CHECKDB found 0 allocation errors and 2 consistency errors in database 'MyDatabase'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
As you can see there is no direction as to which table or object may have corruption.
So I have a series of questions.
1.) What action do I need to take to fix the consistency errors.
I realize that restoring from a good backup is the best solution but that will mean data loss. I also understand any action I may take might result in data loss.
2.) How do I determine which object(s) are the cause?
I want to proceed with caution and I am not about to rush this without good solid information.
Thanks in advance.
Gary
August 11, 2015 at 9:47 pm
OK, Stupid me!
The database has over 4,000 objects in it and when I scrolled through the results of the dbcc checkdb I did not see any errors.
However, after posting this thread, it occurred to me to search the results for the word "error".
I found the error, it was a table and the recommended action was dbcc updateusage.
I ran dbcc updateusage and then re-ran dbcc check db, this time no errors.
I then made a fresh backup.
Thanks to all
Gary
August 11, 2015 at 11:25 pm
This was removed by the editor as SPAM
August 12, 2015 at 2:55 am
In general you want to run CheckDB with the NO_INFOMSGS option. That removes all of the 'x rows in y pages in table z' messages, meaning the errors are very easy to see as they're the only things that get printed.
DBCC CheckDB('My Database') WITH NO_INFOMSGS
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 12, 2015 at 11:42 am
Gail, thank you for the suggestion.
Run DBCC CheckDB('My Database') WITH NO_INFOMSGS
Gary
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply