How to rebuild system databases in SQL Server 2005
Applies to: Microsoft SQL Server 2005.
When system databases are rebuilt, all database objects and data in master,
model and msdb system databases are removed. Rebuilding the master database
installs all system databases to their initial location.
To rebuild the system databases you need to run the setup command from the
Command prompt and follow the following procedure:
1. Click Start, click Run, type cmd, and then click OK.
2. Run the following command to rebuild the system databases:
start /wait <CD or DVD Drive>\setup.exe /qn
INSTANCENAME=Instance_Name REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=StrongPassword
start /wait D:\setup.exe /qn INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine
Notes about this procedure: