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).

36 comments

  • Comment Link Normand Sunday, 01 April 2018 10:01 posted by Normand

    Cracks in partitions, sagging flooring or a moist basement?

  • Comment Link Wilmer Hacken Friday, 30 March 2018 20:52 posted by Wilmer Hacken

    Do you mind if I quote a few of your articles as long as I provide credit and sources back to your weblog? My blog site is in the very same niche as yours and my users would definitely benefit from a lot of the information you provide here. Please let me know if this alright with you. Cheers!

  • Comment Link Dora Friday, 30 March 2018 18:40 posted by Dora

    Learn if refinishing hardwood flooring is for you.

  • Comment Link Callie Saturday, 03 March 2018 22:51 posted by Callie

    The most effective Boston pet sitters are right here.

  • Comment Link Juliet Wednesday, 28 February 2018 19:59 posted by Juliet

    Hi! Do you know if they make any plugins to
    safeguard against hackers? I'm kinda paranoid about losing everything I've worked hard on. Any recommendations?

  • Comment Link Ara Sunday, 25 February 2018 22:11 posted by Ara

    Many tree elimination services function 24 hours a day.

  • Comment Link Hermelinda Wednesday, 21 February 2018 23:21 posted by Hermelinda

    Worldwide motor yacht brokerage specialists.

  • Comment Link Britney Wednesday, 07 February 2018 18:48 posted by Britney

    This might launch asbestos fibers into the air.

  • Comment Link Rita Thursday, 01 February 2018 13:53 posted by Rita

    Does your website have a contact page? I'm having a tough
    time locating it but, I'd like to send you an email. I've got some ideas
    for your blog you might be interested in hearing. Either way, great
    site and I look forward to seeing it improve over time.

  • 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

Leave a comment

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