Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The master database on our SQL Server 2005 instance appears to be corrupted. Since this database powers our MOSS 2007 installation, what steps must be taken to restore master and ensure that MOSS 2007 is restored as well?

Thanks!

share|improve this question
    
What leads you to believe that it's corrupted? –  joeqwerty Sep 14 '11 at 23:34
    
The master database does not power MOSS 2007. It powers the entire SQL server instance. As joeqwerty said, why do you think its corrupted? Do have backups of the master database? –  murisonc Sep 15 '11 at 1:00

1 Answer 1

up vote 2 down vote accepted

If you are sure that it is corrupt, then keep reading. But first, are you completely sure that it is corrupt? How have you decided that it's corrupt? (Sorry to ask, but restoring the master database is a really big deal.)

Assuming that you have a backup of the master database you'll need to stop the SQL Service and restart the instance by running it from the command line by using the -c -f -m switches. This is done from what ever folder the SQL Server binaries are in "c:\program files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\binn" by default.

sqlservr -c -f -m

This will start the SQL Server in the command window. Then connect with SQLCMD in another window and use the RESTORE DATABASE statement to restore the database database from the most recent backup. The instance should shutdown automatically. Restart it and the database should come back online.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.