Restoring the Master Database

The master database is the most important database on SQL Server. This database stores information about all the databases on the server, server configuration, server logons, and other important information. If master gets corrupted, operations on the server may grind to a halt, and you will have to recover master using one of two techniques.

If you can start SQL Server, you can restore master from backup using a process similar to what you would use to restore any other database. To do this, complete the following steps:

  1. You can only back up master using a full backup. As a result, no differential or transaction log backups will be available. This means you may not be able to restore master exactly as it was before the failure and that normally you should use the Recovery state of Leave Database Operational.

  2. When you finish restoring the master database, you may need to apply any changes made since the last full backup manually.

  3. After you check the server and verify that everything is okay, make a full backup of master.

If you cannot start SQL Server and you know master is the cause of the problem, you can restore master by completing the following steps:

  1. Rebuild the master database by running Setup. Use Setup to rebuild, verify, and repair the SQL Server instance and its system databases.

  2. Once you rebuild master and get SQL Server back online, you can restore the last backup of master in order to return the server to its most current state.

  3. Because Rebuild Master rebuilds the msdb and model databases, you may need to restore these databases from backup as well.

  4. Re-create any backup devices if necessary.

  5. Re-enter logins and other security settings if necessary.

  6. Restore replication databases if necessary.

  7. Restore or attach user databases if necessary.

  8. Restore other server configuration settings if necessary.

As you can see from this step-by-step procedure, restoring master can take a lot of time and work, which is why it is so important to back up master regularly. When you finish recovering the server, be sure to make a full backup of the master database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset