If a current backup of master is not available, or the backup cannot be restored because Microsoft® SQL Server™ cannot start due to severe damage to master, master can be rebuilt using the Rebuild Master utility. When master has been rebuilt, a current backup of master can be restored, or the user databases, backup devices, SQL Server logins, and so on, can be re-created using SQL Server Enterprise Manager, or the original scripts used to create those entries.
Important The Rebuild Master utility rebuilds master completely. Because the msdb and model system databases are rebuilt as well, it may be necessary to restore backups of those databases. If any databases are restored or attached after master is rebuilt, it is necessary to specify the same sort order, code page, and Unicode collation when rebuilding master as used by those databases. If the same sort order, code page, and Unicode collation are not used, then it will not be possible to restore or attach those databases.
The general steps required to rebuild master completely if no backup is available are:
Important The compact disc or shared network directory containing the SQL Server installation software is required to rebuild the master database.
When master has been re-created and any changes have been reapplied, back up master immediately.
To rebuild the master database
To start SQL Server in single-user mode
To restore a database backup
To attach a database
Attaching and Detaching Databases | System Tables |
Copying Databases Between Different Code Pages and Sort Orders |