Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

582


Part V: Enterprise Data Management


The msdb database is backed up in the same way that a user database is backed up.

To restore the msdb database, you do not need to put the server in single-user mode as
you do with the master database. However, it’s still not a normal restore because with-
out a current msdb, Management Studio is not aware of the backup history. Therefore,
the msdb backup can’t be chosen as a backup database but must be selected as a backup
device.

Use the Contents button to check the disk device for specifi c backups. If several backup
instances are in the backup device, you can use the Contents dialog box to select the
correct backup. It then fi lls in the fi le number in the restore form.

Before restoring the msdb database, stop SQL Server Agent. This is to ensure that the msdb database is not
accessed by the SQL Server Agent and allows the restore to complete.

Performing a Complete Recovery


If the server has completely failed and all the backups must be restored onto a new server,
follow these steps:


  1. Build the Windows server, and restore the domain logins to support Windows
    authentication.

  2. Install SQL Server and any service-pack, cumulative updates, security upgrades, or
    hotfi xes.

  3. Start SQL Server in single-user mode, and restore the master database.

  4. Verify that SQL Server Agent is stopped. Restore the msdb database.

  5. If the model database was modifi ed, restore it.

  6. Restore the user databases.


Best Practice


Performing a fl awless recovery is a “bet your career” skill. Take the time to work through a complete
recovery of the production data to a backup server. The confi dence you gain can serve you well as a
SQL Server DBA.

c21.indd 582c21.indd 582 7/31/2012 9:22:54 AM7/31/2012 9:22:54 AM


http://www.it-ebooks.info
Free download pdf