Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How To Repair A Suspect Database In MS SQL.  (Read 2976 times)

0 Members and 1 Guest are viewing this topic.

Chetan Singh

  • Full Member
  • ***
  • Posts: 123
  • Karma: +2/-0
  • Bienvenido a las Tecnologías de la Admin-Ahead.
    • Admin-Ahead Server Technologies.
How To Repair A Suspect Database In MS SQL.
« on: November 30, 2013, 09:24:02 pm »
Hi,

You have a database in MS SQL that is tagged as suspect and you are unable to connect to the database. It's because the database could have become corrupted.  You can repair database with following steps.

1) Open Microsoft SQL Server Management Studio and connect to your database.
2) Click the New Query button.
3)Paste the following SQL script into your New Query page replacing [YourDatabase] with the name of your database.

=====================>>>
EXEC sp_resetstatus [YourDatabase];
ALTER DATABASE [YourDatabase] SET EMERGENCY
DBCC checkdb([YourDatabase])
ALTER DATABASE [YourDatabase] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ([YourDatabase], REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE [YourDatabase] SET MULTI_USER
=====================>>>

4) Click Execute.

Note:- Always back up the website before making any changes to the database. Your database should no longer be tagged as (suspect) and you should be able to access it.

Thank you,


Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!