Search
Home
Articles
Backup
Books
Certification
FAQ
Products
Replication
Scripts
Seminars
Training
TSQL

MSDN Fourms
Philippine SSUG
Fort Worth SSUG
Oklahoma City SSDG

Resume

MHS Enterprises
BlowFrog Software
FilAm Software
AcrylicAcetate.com
Bargain Humidors
Western Humidor

Backup Overview 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

If the database did not come back up clean, you must perform the following procedure:
  1. From isql/w, drop the suspect database
  2. Restore the database from the most recent full backup.
  3. Apply any transaction logs.
  4. Run a full battery of DBCCs (checkdb, newalloc, checkcatalog) on the restored database.
  5. Perform a full server backup.
  6. Open the server for production. (This can be done as you are performing the full server backup.)

Corrupt msdb

You will need to restore from the most recent backup. After the restore is complete, you must ensure that all of your jobs, alerts, and operators still exist and are working. You can do this by recreating each of the jobs, alerts, and operators.

Corrupt master

Having a corrupt master database is the most severe internal problem you can have in SQL Server. This will require a full rebuild of the SQL Server. The process for doing this is as follows:

  1. Place the server in single user mode and also dbo use only.
  2. Restore the most recent backup of master.
  3. Verify that SQL Server is up and all databases are recognized.
  4. If all databases are recognized and available, run a few queries of random tables in each database to verify.
  5. If everything checks out at this stage, turn off the single user mode and dbo use only and open the server for activity.

If the above procedure does not work or a database was reset to suspect after you reset the status, you have corruption that has propagated to the user databases. You must fix this by the following procedure.

  1. From isql/w, drop the suspect database
  2. Restore the database from the most recent full backup.
  3. Apply any transaction logs.
  4. Run a full battery of DBCCs (checkdb, newalloc, checkcatalog) on the restored database.
  5. Perform a full server backup.
  6. Open the server for production. (This can be done as you are performing the full server backup.)

Bad master backup

If the backup of master is bad, you still have some options. The procedure to recover the server is as follows:

  1. Rebuild master
  2. Make sure the server is in single user mode.
  3. Execute a sp_attach_db for each user database
  4. Stop and restart SQL Server.
  5. Your server should come back to life with all of the databases intact.
  6. Recreate each of the backup devices.
  7. Recreate all jobs, alerts, and operators.
  8. Turn on allow updates and stop and restart SQL Server
  9. BCP in the output file from syslogins.
  10. Turn off allow updates
  11. Stop and start SQL Server

Backup Overview 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

Michael R. Hotek

All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.