Rebuilding the master Database

Administering SQL Server

Administering SQL Server

Rebuilding the master Database

The master database can be rebuilt using the Rebuild Master utility if:

  • A current backup of master is not available.

  • The backup cannot be restored because an instance of Microsoft® SQL Server™ cannot start due to severe damage to master.

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 will normally be necessary to restore backups of those databases.

The general steps required to rebuild master completely if no backup is available are:

  • Run the Rebuild Master utility to rebuild the system databases.

    Important  The compact disc or shared network directory containing the SQL Server installation software is required to rebuild the master database.

  • Re-create any necessary backup devices.

  • Reimplement security operations.

  • Restore msdb if necessary.

  • Restore model if necessary.

  • Restore distribution if necessary.

  • Restore or attach user databases if necessary.

When master has been re-created and any changes have been reapplied, back up master immediately.

To rebuild the master database