Thursday, March 5, 2015

Suspect Database.


    Some time we come to see the database are in Suspect Mode after coming to the shift and checking the databases as part of the daily routine checks.

To Fix this follow the below steps.


  1. EXEC SP_RESETSTATUS <'DBNAME'>;
  2. ALTER DATABASE <'DBNAME'> SET EMERGENCY;
  3. DBCC CHECKDB('DBNAME');
  4. ALTER DATABASE <'DBNAME'> SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  5. DBCC CHECKDB ('DBNAME', REPAIR_ALLOW_DATA_LOSS);
  6. ALTER DATABASE <DBNAME> SET MULTIUSER;
  7. GO





No comments: