How to repair “Suspect” database

Published on : Dec 3, 2012

Category : General

Saravana

Author

We were testing some throttling parameters in BizTalk, and for that we were pumping lots of load into our test environment. The system soon became unstable and we had to do a hard restart. After the restart, when we opened the SQL enterprise manager we spotted some of the databases are in “Suspect” state as shown below. suspect state databases After doing some research, the following script worked smoothly and the database(s) were recovered without any issues EXEC sp_resetstatus ‘BizTalk360’; ALTER DATABASE BizTalk360 SET EMERGENCY DBCC checkdb(‘BizTalk360’) ALTER DATABASE BizTalk360 SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB (‘BizTalk360’, REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE BizTalk360 SET MULTI_USER Find and Replace ‘BizTalk360’ with your own database name. Note: The solution is provided AS-IS without claiming any warranty. It worked for me, so it may work for you.