SQL Server Tips

How to re sync existing Log Shipping Setup

Log shipping setup on our current environment was running very well, but today I’ve got an alert that Log Shipping Restore job was failed to run. When checked the error log on the server, I’ve found out that log version between primary server and secondary server was not synchronized anymore. And what I have to do is to re sync database version between both server. Here is the steps how to do that task :

      • Disable all job related to log shipping task in primary and secondary server:
        • Restore Job
        • Copy Job
        • Backup Job
      • Take full backup of Primary database, and copy the backup file to secondary server backup location.

    • Change secondary database into online mode with the following command :
      RESTORE DATABASE <databasename> WITH RECOVERY
      GO
      
    • Restore Secondary server database using Primary server database backup with option WITH STANDBY / READ ONLY or WITH NO RECOVERY mode.
    • Enable all related log shipping job with the following order :
      • Backup Job
      • Copy Job
      • Restore Job
    • That’s it. Wait until 2 times job cycles then you should see successive schedule for log shipping process.

Thank you very much.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s