How To Repair A Suspect Database In MSSQL

Rate this item
(0 votes)
How To Repair A Suspect Database In MSSQL

Issue

You have a database in MS SQL that is tagged as (suspect) and you are unable to connect to the database.

Possible Causes

  • The database could have become corrupted.
  • There is not enough space available for the SQL Server to recover the database during startup.
  • The database cannot be opened due to inaccessible files or insufficient memory or disk space.
  • The database files are being held by operating system, third party backup software etc.
  • There was an unexpected SQL Server Shutdown, power failure or a hardware failure.

Resolution

These steps require you to have Microsoft SQL Server Management Studio installed on your computer.  If you do not have this installed please follow the steps outlined in the following article: How To Connect To Your MS SQL Database

Always back up the website before making any changes to the database . Shared hosting customers can do this through the Control Panel. Refer to Back Up Your Website Using Plesk. Dedicated server customers can back up the site either through the Control Panel, or through the Control Suite. Refer to How to Back Up a Domain Using Control Suite.

  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.
<pre>
<code>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</code>
</pre>

       4.  Click Execute

Your database should no longer be tagged as (suspect) and you should be able to access it.
 

Reference: https://support.managed.com/kb/a398/how-to-repair-a-suspect-database-in-mssql.aspx

Last modified on Friday, 17 July 2015 08:00
Data Recovery Expert

Viktor S., Ph.D. (Electrical/Computer Engineering), was hired by DataRecoup, the international data recovery corporation, in 2012. Promoted to Engineering Senior Manager in 2010 and then to his current position, as C.I.O. of DataRecoup, in 2014. Responsible for the management of critical, high-priority RAID data recovery cases and the application of his expert, comprehensive knowledge in database data retrieval. He is also responsible for planning and implementing SEO/SEM and other internet-based marketing strategies. Currently, Viktor S., Ph.D., is focusing on the further development and expansion of DataRecoup’s major internet marketing campaign for their already successful proprietary software application “Data Recovery for Windows” (an application which he developed).

27 comments

  • Comment Link Cooper Friday, 12 January 2018 08:15 posted by Cooper

    It's hard to come by experienced people on this subject, but you seem like you know what you're talking about!

    Thanks

  • Comment Link Reginald Sunday, 07 January 2018 01:57 posted by Reginald

    Very good write-up. I certainly appreciate this site.
    Stick with it!

  • Comment Link Rhys Sunday, 03 December 2017 04:22 posted by Rhys

    Do you have any video of that? I'd want to find out more details.

  • Comment Link Rebekah Friday, 24 November 2017 19:29 posted by Rebekah

    Can I just say what a relief to uncover an individual who actually understands what they are talking about over the
    internet. You definitely realize how to bring a problem
    to light and make it important. A lot more people ought to check this out and understand this side
    of your story. I can't believe you are not more popular since you definitely possess the gift.

  • Comment Link Aubrey Monday, 20 November 2017 13:32 posted by Aubrey

    Hi, I do believe this is a great blog. I stumbledupon it ;) I will return once again since I bookmarked it.
    Money and freedom is the greatest way to change, may you be rich and continue to help others.

  • Comment Link Jewell Monday, 13 November 2017 02:20 posted by Jewell

    Link exchange is nothing else but it is just placing the
    other person's weblog link on your page at appropriate place and other
    person will also do similar for you.

  • Comment Link Sherlene Saturday, 11 November 2017 22:42 posted by Sherlene

    Wow, marvelous blog layout! How long have you
    been blogging for? you made blogging look easy.

    The overall look of your website is fantastic, as well as the content!

  • Comment Link Jannette Thursday, 09 November 2017 05:17 posted by Jannette

    What's up to all, it's in fact a pleasant for me to visit this web page, it contains precious Information.

  • Comment Link Ginger Wednesday, 08 November 2017 01:46 posted by Ginger

    Wonderful blog! I found it while browsing on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?
    I've been trying for a while but I never seem to get there!
    Thank you

  • Comment Link Carmela Monday, 06 November 2017 21:20 posted by Carmela

    Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to more added agreeable from you! By the way,
    how could we communicate?

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.