How to Recover SQL Data from Suspect Mode?

Published: 20th May 2010
Views: N/A

SQL Server Management Studio (SSMS): At the time of SQL Server installation, the database users are given an integrated environment called SQL Server Management Studio (SSMS). The function of SSMS is to successfully configure, manage, develop and access all SQL server elements in a collaborative way. The importance of SSMS is thus obvious and therefore, any type of corruption in SSMS can result in inaccessibility of your SQL database contents like tables, queries, triggers, stored procedures, rules, user functions, etc. You might as well confront some error messages.

Suspect Error Showing in SQL Server Database: Now, in such aforementioned situation, it can happen that when you try to connect to your SQL Server database and try to open SSMS, then you might encounter an error message saying: "Database 'msdb' cannot be opened. It has been marked suspect."

Why SQL Database Goes in Suspect Mode? One of the most plausible reasons behind the abovementioned error message is that your SQL Server database must have been suspected. This suspected mode of SQL database can occurs when one or both of the following conditions happen:

1. The error log file not matches with the database file

2. SQL database MDF file corrupts

SQL Server Database Inaccessibility: After such incidence, when you try to view the SQL Server application event log, you can find this entry: "The log scan number (152:284:1) passed to log scan in database 'msdb' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup." When you get such an error message, then your SQL Server database becomes totally inaccessible to you.

A Resolution: For solving this problem, you can try to use the inbuilt utility of SQL Server i.e. sp_resetstatus. Using this tool, you can change the status of SQL database and can get access to the database again. Here is a process that you can try yourself by just performing the following steps:

1) First, make sure that the device file is available.

2) Use sp_resetstatus (supplemental stored procedure) to reset the status of the suspected database.

* For SQL Server 6.0/6.5: If this is not done already then create procedure by executing the Instsupl.sql script (found in the MssqlInstall directory).

* For SQL Server 7.0 and later versions: Create it at installation by the inscat.sql script (found in MssqlInstall directory).

3) Run sp_resetstatus in master database for the suspect SQL database:

use master


exec sp_resetstatus your_database_name

4) Stop and start the SQL database Server again.

5) Confirm that the database is recovered and is available.


Another Way to Solve the Trouble: In case you fail to recover SQL database from suspect mode using this inbuilt tool even after performing all the above steps, then there is another way to repair SQL database showing suspect error and that is by using third-party software tool to restore SQL Server. This is an easy, safe, effortless, efficient and time saving way for SQL Server recover suspect database. You just have to invest a small amount of money for an outside tool to easily recover SQL database from suspect mode. This will save your time, energy and effort greatly. If you get a low-priced tool that it would be an icing on the cake for you. One such easy-to-use, quick performing and efficient recovery solution is SysTools SQL Recovery software, which you can use to repair SQL database showing suspect error and to recover SQL database from suspect mode Additional benefit to all these useful advantages is that SQL Recovery software is a cost-effective solution to restore SQL Server. The price of the Full Licensed Versions starts at ONLY $99 (for the Personal License).

Report this article Ask About This Article

More to Explore