Home Forums SQL Server 2005 Data Corruption MDF-Can't Get Out Of Suspect Mode....Need Some Help Please RE: MDF-Can't Get Out Of Suspect Mode....Need Some Help Please

  • I want to share this across as I recently faced issue. Today in morning when I tried to connect to database server, I find it in suspect mode. At this point your database server won’t allow you to perform any operation on that database until the database is repaired.

    A database can go in suspect mode for many reasons like improper shutdown of the database server, corruption of the database files etc.

    To repair the database, run the following queries in Query Analyzer

    EXEC sp_resetstatus ‘yourDBname’;

    ALTER DATABASE yourDBname SET EMERGENCY

    DBCC checkdb(‘yourDBname’)

    ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    DBCC CheckDB (‘yourDBname’, REPAIR_ALLOW_DATA_LOSS)

    ALTER DATABASE yourDBname SET MULTI_USER

    And It Repairs the Database. It Works for Me 🙂