Workaround resolving Recovery or Suspect mode MSSQL 2005

Workaround resolving Recovery or Suspect mode MSSQL 2005

I found this article on a website, though of sharing it on my blog.

You can run the following SQL query to get the database to the EMERGENCY mode.
ALTER DATABASE  dbname  SET  EMERGENCY

Once altered the database to Emergency mode,
Enter the below
ALTER DATABASE  dbname  SET SINGLE_USER

Now, You can execute the below command to repair the broken / recover / suspect mssql database
DBCC CheckDB (dbname , REPAIR_ALLOW_DATA_LOSS)

Once done, get back the MSSQL mode to multi user
ALTER DATABASE  dbname  SET MULTI_USER

change the dbname to your MSSQL database name

Comments