Articles in this section

Recovering MS SQL Database from Suspect Mode

This article describes how to recover a database from suspect Mode with SQL.

  1. Switch the database to the Emergency Mode.
    1. Start the Microsoft SQL Server Management Studio and connect your database.
    2. Choose "New Query".
    3. Turn off the suspect flag on the database and switch it to EMERGENCY.
      1. EXEC sp_resetstatus 'db_name';
      2. ALTER DATABASE db_name SET EMERGENCY
  2. Perform the function Consistency Check on the Master Database.
    1. DBCC CHECKDB ('database_name')
  3. Bring the database into Single User Mode, and then roll back the previous transactions.
    1. ALTER DATABASE database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE
  4. Back up the database since the next operation may cause data loss.
  5. Execute Database Repair allowing some data loss.
    1. DBCC CHECKDB ('database_name', REPAIR_ALLOW_DATA_LOSS)
  6. Change the database into Multi-User Mode.
    1. ALTER DATABASE database_name SET MULTI_USER
  7. Refresh the SQL database server and check the connectivity of the database.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.