Blog Home  Home RSS 2.0 Atom 1.0 CDF  
 
hoohee.com - How to recover from "Cannot recover the master database. Exiting." or "msdb (suspect)"
 Sunday, March 19, 2006

Quick Options:
1. Restore from a backup copy.
2. Run the Rebuild Wizard (Rebuildm.exe).
3. Start sqlservr with the -T3607 option.
4. Force status reset by running (WARNING: THIS IS A DANGEROUS OPERATION USE ONLY IF YOU KNOW WHAT YOU ARE DOING) UPDATE SYSDATABASES SET STATUS=-32768 WHERE NAME='DBNAME'
5. Call Microsoft professional services.

Related Links:
http://support.microsoft.com/default.aspx?scid=kb;en-us;180500
http://support.microsoft.com/kb/165918/

WORKAROUND:
To work around this problem, perform the steps below. Note that the final step is critical.
1. Ensure that the device file is actually available.
2. Use the supplemental stored procedure sp_resetstatus to reset the status of a suspect database. For more information on sp_resetstatus, see the "Resetting the Suspect Status" topic in the SQL Server Books Online.If you have not already done so, create this procedure by executing the Instsupl.sql script, found in the Mssql\Install directory.
3. Use the supplemental stored procedure sp_resetstatus to reset the status of a suspect database. If you have not already done so, create this procedure by executing the Instsupl.sql script, found in the Mssql\Install directory. For more information on sp_resetstatus, see the "Resetting the Suspect Status" topic in the SQL Server Books Online.
4. Execute sp_resetstatus in the master database for the suspect database:

use master
go
exec sp_resetstatus msdb -- replace msdb with your database name

You will see the following output:

Prior to Update sysdatabases attempt for DBName='msdb', the mode=0
and status=328 (status suspect_bit=256). For DBName='msdb' in
sysdatabases, status bit 256 was forced Off and mode was forced to
0. WARNING: You MUST stop/restart SQL Server prior to accessing this
database!

5. Stop and restart SQL Server.
6. Verify that the database was recovered and is available.
7. Run DBCC NEWALLOC, DBCC TEXTALL, and DBCC CHECKDB.

3/19/2006 11:54:46 PM (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0]   MSSQL  | 
Comments are closed.
Copyright © 2008 Emile Bassil. All rights reserved.