Sometimes a SQL Server database can become damaged and get listed as SUSPECT in the SQL Server Management Studio.

In these cases, if you do not have a good backup you wish to recover from you can try the following.

Open the SQL Server Management Studio

Find the Suspect database

Right Click it and select New Query

Then run each of the following (individually)

  • alter database TrakkerHistorySQL set emergency
  • alter database TrakkerHistorySQL set Single_User with rollback immediate
  • dbcc checkdb (‘TrakkerHistorySQL’, REPAIR_ALLOW_DATA_LOSS)
  • alter database TrakkerHistorySQL set multi_user
  • alter database TrakkerhistorySQL set online

 

 

Advertisements

2 thoughts on “Repair SQL Server database suspect

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s