question

GLR avatar image
GLR asked

Database returning as suspect

I was working on an application that runs on SQL 2008 R2 which has 3 databases , power went off and after it resumed back I got one of the database being marked as Suspect , How do I go about this.
databasesuspect
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
What you want to do if your database has gone into Suspect state, you will have to try bringing it online in order to perform analysis on the error cause. While you analyse the database, you do not want users to connect to the database. This can be done with a sequence of commands: USE MASTER; EXEC sp_resetstatus 'your_database_name'; ALTER DATABASE your_database_name SET EMERGENCY; When that's done, you will hopefully have your database in Emergency state rather than suspect. This means that the database is read-only, and only members of the sysadmin fixed server role can access the database. In this state, you can perform DBCC CHECKDB on the database, to analyse why it Went into suspect state in the first Place. From then, you'll have to do different things depending on what DBCC CHECKDB reports. But this is a start, to be able to analyse the database and decide on the next step(s).
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GLR avatar image GLR commented ·
Thanks Magnus Let me try this out to know the next step to take ,will probably come back to you for more of this
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.