Solved

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

Posted on 2016-10-17
2
301 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 18

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

630 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