SQL Server "Suspect" database?

First thing is to make sure you DO NOT detach that database.

Restoring from the last known goodbackup is fine. Otherwise you will need to use the EMERGENCY repair mode (I am assuming you are running SQL 2005 or higher). Here are a couple of posts from Paul Randal on the subject. Read them both before you start taking any action.

Creating, detaching, re-attaching, and fixing a SUSPECT database

EMERGENCY-mode repair: the very, very last resort


Pretty much yes.

Generally it means the files are bollixed or missing or a disk error or some such (I've seen a bad sector cause this).

My steps:

  • Ensure all backups are there
  • Shut down SQL Server
  • chkdsk the disks used by SQL Server (hopefully not your C: of course)

Edit: I'll clarify my answer

  • if the data is important I'll have a backup
  • downtime while messing around with repairs and emergency mode is too long for me

I have written some guidance on this for 2 cases of suspect database: when you have lost the data file or log file. Please read the following:

  • SQL 2005/2008 Database Recovery procedure – Data File deleted (Part 2)
  • SQL 2005/2008 Database Recovery procedure – Data File deleted (Part 3)

Tags:

Sql Server