Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Databse is showing in Suspect.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2012-02-02 : 02:47:25
Hello All,

My database is showing Suspect after restarted the server.

What is this and why it's came ?
Can anybody please tell me how to resolve this issue ?



Thanks and Regard's
Harish Patil

Kristen
Test

22859 Posts

Posted - 2012-02-02 : 05:19:09
Some data was in cache that was not cleared to the disk? If you did a clean shutdown I would think that that should not happen, but if the server was power-cycled then it might.

Do you use DBCC CHECKDB often? If not the database might have been corrupted for some time (and if that is the case you almost certainly have a hardware fault that you need to find-and-fix otherwise the problem will reoccur).

The simplest fix is to restore from backup. If your database is in Full Recovery Model then you should be able to take a TAIL log backup first, and not lose any data.#

I suggest you restore to a different machine first, to prove you can, run a DBCC CHECKDB on that restored database and make sure it is not corrupted. If it is then you need to look at fixing the hardware on the main server before trying to restore etc.

If you don't have a second machine the restore to a NEW (temporary) database, but if you get errors during the restore (and if you have hardware faults on that server) you won't know if the backup file is corrupted, or if the machine corrupted your database during the restore ... hence why using a second machine is preferable.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-02-02 : 08:21:28
Reason is that SQL encountered corruption when it ran crash recovery on the database. Assuming you run checkDB regularly, you should know when that corruption occurred.

Resolution - restore a clean backup of the database. You can take a tail-log backup and then restore with no data loss if you have an unbroken chain of log backup from the full backup you're using right up to the time of the restart. If you don't, then you're losing any data since that clean backup.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -