0

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!

SidC
  • 369
  • 3
  • 9
  • 23
  • 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 01:00

1 Answers1

2

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.

mrdenny
  • 27,074
  • 4
  • 40
  • 68