2015-11-13

Recover Log Shipping Secondary DB from status Suspect

Sometimes your Log Shipping Secondary database will be go into "Suspect" mode, due to various reasons including log shipping Restore Job failed, log backup file corrupted, and transaction log backup files grown too large due to maintenance task on primary database such as index rebuild. You can recover the secondary database by restoring a recently Full/Differential database Backup WITH NORECOVERY option. Below are the steps:
  1. Make a Full/Differential database Backup from the Primary database;
  2. Copy this database backup to the Secondary server;
  3. Restore the Secondary database by this backup WITH NORECOVERY;
  4. Start the Log Shipping Restore Job on Secondary server;
  5. Check the Job History of the Log Shipping Restore Job, you can see it skips all the log backup files with LSN before the database backup you just restored;
  6. If the Log Shipping Copy Job is still running, eventually the Restore Job will find the log backup files with LSN after the database backup;
  7. At last the secondary database catch up and resumes.

No comments:

Post a Comment