581
Chapter 21: Backup and Recovery Planning
21
- Run the following from the command prompt to start a default instance of SQL
Server in single user mode:
sqlservr.exe -m
If the instance is a named instance of SQL Server in single user mode, run the fol-
lowing to start:
sqlservr.exe -m -s <instancename>
- Reapply any SQL Server updates, service packs, and hotfi xes previously applied to
the SQL Server. - Restore the master database as you would a user database. If a master backup is not
available, re-create all missing entries for your user databases, logins, endpoints,
and so forth.
If the master database is accessible, start SQL Server in single-user mode, and then restore
the master database as you would a user database.
Rebuilding the master database also rebuilds the msdb and model databases. After rebuilding the databases,
restore the system databases (master, msdb, and model) from the most recent good backup.
Rebuilding the master database installs all system databases to their initial location. If initially one or more system
databases were moved to a different location, a similar move is required again.
MSDB System Database
Like the master database, the msdb database, by default, uses the simple recovery model.
Because the msdb database contains information regarding the SQL Server Agent jobs
and schedules, as well as the backup history, it should be backed up whenever you do the
following:
■ (^) Perform backups.
■ (^) Save SSIS packages.
■ (^) Create new SQL Server Agent jobs.
■ (^) Confi gure SQL Server Agent mail or operators.
■ (^) Confi gure replication.
■ (^) Schedule tasks.
■ (^) Create or modify any policies created in Policy-Based Management.
■ (^) Confi gure or modify Management Data Warehouse.
■ (^) Add new registered servers (if an instance is set up as Central Management Server).
c21.indd 581c21.indd 581 7/31/2012 9:22:54 AM7/31/2012 9:22:54 AM
http://www.it-ebooks.info