Rebuilding or Restoring The SQL Server 2008 Master Database

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值