Solved

Steps for fail over log shipping database from primary to secondary during DR drill and switch back

Posted on 2016-10-17
2
221 Views
Last Modified: 2016-10-19
Hi there,

  Could anyone share the steps involved during DR drill for failing over the log shipped databases and app team is gonna do some tests on the secondary database(which will become primary after faiover) then switch it back to the original stake after testing(ie., secondary will again goes to standy/read only) and primary will become active with the logs should resume its syn up job.

Please note, I am running MS SQL Server 2008 R2 enterprise edition on both the servers.

thanks
Deepak
0
Comment
Question by:Deepak Kumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
Emmanuel Adebayo earned 500 total points
ID: 41847804
Hi,

To fail over to a secondary log shipping server, follow this 10-step process:

    1. Disable all backup jobs that might back up the database on both log shipping partners.
    2. Disable the log shipping jobs.
    3. Run each log shipping job in order (i.e., backup, copy, and restore).
    4. Drop log shipping.
    5. Manually back up the log of the primary database using the NORECOVERY option. Use the command

    BACKUP LOG [DatabaseName]
      TO DISK = 'BackupFilePathname'
      WITH NORECOVERY;

    where DatabaseName is the name of the database whose log you want to back up and BackupFilePathname is the backup file’s pathname (e.g., Z:\SQLServerBackups\TLog.bck).
    6. Restore the log backup on the secondary database using the RECOVERY option, and bring the secondary database online. The primary and secondary databases have now switched positions.
    7. Back up the log of the new primary database (optional).
    8. Restore the log on the new secondary database using the NORECOVERY option (optional).
    9. Reconfigure log shipping.
    10. Re-enable any backup jobs that were disabled.
For more info check the following links
http://dbasqlserver13.blogspot.co.uk/2013/12/failover-and-failback-in-logshipping.html
https://msdn.microsoft.com/en-us/library/ms191233.aspx

regards
0
 

Author Closing Comment

by:Deepak Kumar
ID: 41851435
Thanks Emmanuel for your help!! I really appreciate it.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question