Here you will find information on how to rebuild the SQL Server 2008 Master Database.
One of the improvements to SQL Server 2008 is that when you install it the SQL databases are copied from the installation media to the Program Files directory on your server and placed in the following location:
Microsoft SQL Server/MSSQL10.MSSQLSERVER/MSSQL/Binn/Templates
In the previous versions of SQL server if you had to rebuild your Master database you had to have the installation media in order to do so. With SQL Server 2008 this is no longer the case. The Master, Model and MsdbData primary data files and their transaction log files are all locally available.
Follow the steps below to rebuild the Master Database.
1. From a command prompt window change to the following directory:
"C:/Program Files/Microsoft SQL Server/100/Setup Bootstrap/Release"
2. Next paste the following into the command prompt window and press “Enter”:
Setup.Exe /Action=RebuildDatabase /InstanceName=MSSQLSERVER /SqlSysAdminAccounts=Admin
The instance name will be MSSQLSERVER unless you are using a named instance and in that case change MSSQLSERVER to your instance name and the SqlSysAdminAccounts will be an account with SysAdmin rights then and press “Enter” again.
Note: You can also use the /Quiet switch but for greater control I do not use it.
When the rebuild has completed review the Summary.Txt file in the Program Files/Microsoft SQL Server/100/Setup Bootstrap/Log directory and you can also review the files in then YYYYMMDD_xxxxxx directory as well.