Page 1 of 1

MS-SQL / Broken Master DB

Posted: Fri Sep 08, 2006 5:59 pm
by gilthanaz
[Problem]
After a reboot, MS SQL 7 did not start up. After manually launching it by executing C:\mssql\binn\sqlservr.exe in the shell, i got this error message:
Error: 9003, Severity: 20, State: 1. Cannot recover the master database. Exiting.

[Solution]
I've tried a dozen things, but this is really a pain in the ass. The only solution - even tho it costs you all your databases - is, to use the MS master restore utility provided my Microsoft. You will find it in C:\MSSQL\binn\rebuildm.exe . Execute it, and have your SQL7 installer CD ready - you need the CD\x86\DATA\ directory! Its a pain that you can't get that 8MB file you need for restoring without having the whole CD somewhere... anyway, execute it, point the directory to the DATA directory on the CD, and choose the correct collation. It will then shut down the server, rebuild the master database, restart the server, and so on. After a while you will get a "Success!" - try to kick the server up, should work now.

And then ... have fun installing all your databases, users, and everything else, at least from the status of the last backup.