SQL Server Error - How to rebuild the system databases


  1. Need to stop both SQL Server Services and SQL Server Agent Services
  2. Find sqlservr.exe. It is in different folders in 2005 and 2008.
    • In 2005: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn
    • in 2008: C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLServre\MSSQL\Binn
  3. If there are errors, especially in 2008 such as InitErrLog, run the command prompt as an administrator.
  4. Run the command in single user mode: sqlservr -m, then use the setup.exe option to rebuild one of the system databases (see 2005 DBD book p.541 for details)