Connect Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 31 March 2013

Restoring a MSSQL 2005 database stuck in suspect mode

Posted on 18:39 by Unknown
If you happen to notice that your MSSQL database/s are stuck in suspect mode, you can easily run a query that will process the database and restore it for you (restore the status, not the actual database).

To do this, you simply need to run the following query. Keep in mind you will need to change our “your database name” for the actual database name.

EXEC sp_resetstatus yourdatabasename;
ALTER DATABASE yourdatabasename SET EMERGENCY
DBCC checkdb(yourdatabasename)
ALTER DATABASE yourdatabasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (yourdatabasename, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourdatabasename SET MULTI_USER


This will correct the issue and you can continue using the database.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

Categories

  • booting Process
  • linux
  • redhat

Blog Archive

  • ▼  2013 (68)
    • ►  July (1)
    • ►  May (2)
    • ►  April (11)
    • ▼  March (54)
      • Windows 2008 Password Complexity
      • Unable to shrink database log file ( DBCC shrinkfi...
      • The media family on device is incorrectly formed. ...
      • The 'Microsoft.Jet.OLEDB.4.0' provider is not regi...
      • SQL Warning in Functions.php on line .....The func...
      • Shrinking Truncate SQL SERVER Log File
      • Roles and Features showing an error HRESULT: 0x800...
      • Restoring a MSSQL 2005 database stuck in suspect mode
      • PowerShell script cannot be loaded because the exe...
      • MySQL Password Reset
      • Limit SQL Connections through Windows Advanced Fir...
      • Microsoft JET Database Engine error ''80004005'' -...
      • How to shrink a database log file for MSSQL Using ...
      • IIS www service fails to start with error ID 1363
      • How to retireve the password for an email account ...
      • How to resolve Windows Login Error: "An unauthoriz...
      • How to reset a DNN password at the Database
      • How to resolve error ' Error 8004020e '
      • How to reset WordPress admin password
      • How to change the Data folder for SQL Server from ...
      • Horde logout error
      • Error: mailManager->turnOnDomain() failed: mailmng...
      • Force Visitor Browser to use SSL
      • Error: Access for administrator from address 'XX.X...
      • Error - "Failed to retrieve data for this request ...
      • Enable wildcard SSL certificate for the subdomains...
      • Enable multiple RDC sessions from one user in Wind...
      • Disable Shutdown option in Windows
      • Disallowed Parent Path
      • Difference between CNAME and A records, and when t...
      • Difference between Active and Passive modes in FTP
      • annot open database "DATABASENAME" requested by th...
      • Block IP address with Windows Firewall 2008
      • An ASP.NET setting has been detected that does not...
      • Adjust Page File / Virtual Memory on Server 2008
      • Access Smartermail without port
      • 503 This mail server requires authentication when ...
      • Error : 425 Can't Open Data Connection
      • "502 Bad Gateway" - Resolution
      • Error 15023: User already exists in current database.
      • Basic Mysql Commands
      • Basic FTP Commands
      • Unable to start MySQL "Error 1067: The process ter...
      • Cannot Add Attachments Using the SmarterMail Web I...
      • How to use a MySQL test script to verify if your M...
      • Access is denied. (Exception from HRESULT: 0x80070...
      • Set a Fixed Amount of Memory (SQL Server Managemen...
      • Could not load file or assembly \'CrystalDecisions...
      • Custom php.ini per domain in Plesk Windows server
      • How to upgrade Zen Cart 1.3.9 to Zen Cart 1.5
      • How to bulk import products into Zencart 1.5
      • How to move wordpress site to a new Website
      • An error has occurred. Furthermore, Horde encounte...
      • HTTP Error 403.19 – Forbidden The configured user ...
  • ►  2012 (44)
    • ►  September (20)
    • ►  August (1)
    • ►  July (4)
    • ►  June (12)
    • ►  May (2)
    • ►  March (4)
    • ►  February (1)
  • ►  2011 (1)
    • ►  February (1)
  • ►  2009 (9)
    • ►  September (3)
    • ►  August (2)
    • ►  June (1)
    • ►  May (2)
    • ►  March (1)
Powered by Blogger.

About Me

Unknown
View my complete profile