You are on page 1of 2

Log shipping - switchover and failback

TAKE CONFIRMATION FROM APPLICATION TEAM WHETHER ALL APPLICATION SERVICES ARE
STOPPED PROPERLY-----
1. take full backup in DC FOR the DATABASE
2. run lsbackupjob and disable in DC
3. run lscopyjob and disable in DR
4. run lsrestorjob and diable in DR
5. backup log TEST to
disk=N'C:\Program Files\Microsoft SQL Server\MSSQL10.DC\MSSQL\Backup\TEST\TESTTAIL.BAK'
WITH NORECOVERY
6. copy the taillog backup from DC to DR manually
7. restore the database rightclick on databases -->restore database-->
--> IN RECOVERY STATE-->SELECT THE OPTION RESTORE WITH RECOVERY./////
8. THEN DR DATABASE WILL BE UP
9. DC DATABASE WILL BE IN RESTORING MODE
10 fix the orphan users
11.-- RECONFIGURE LOGSHIPPING BEFORE THAT REMOVE PREVIOUS LOGSHIPPING FROM DR
-- AND CONFIGURE AGAIN LOGSHIPPING MAKING DR AS PRIMARY AND DC AS SECONDARY
-- RUN THE LSBACKUP JOB IN DR[MEANS PRIMARY[DC] NOW]
-- RUN THE LSCOPY AND LSRESTORE JOBS IN DC[MEANS SECONDARY[DR] NOW ]ENABLE LS
ALERT IN BOTH DC - DR
12 -- REFRESH THE DRINSTANCE AND DC INSTANCE NOW CAN SEE THE DATABASE IN
DC[CURRENT DR] IN (Standby/Read-Only)mode
13.-- check the logshipping sync working properly or not
14. --------- SWITCH OVER COMPLETED--------------------
---------------------------------------------------------------------------

up We are doing a planned failover and switch back from the primary to DR with
vote2do mirroring. We do not have a separate monitor instance.
wn vote favorite

Please help me with the following 1. Is it possible to switch back without the testing
changes made in DR. OR fallback will have to include the changes tested from DR? 2.
Does taking a backup prior to DR test impact log backup/copy/restore process

Are you using Log Shipping or Mirroring? Your title says Log Shipping but you mention mirroring in the body of th
question. KenWilson Feb 4 '14 at 16:15

We are using both log shipping and mirroring. Mirroring between server 1 and 2, server 3 and server 4. Log shippin
between server 1 and server 3. I need to test failover from server 1 to server 3 and test mirroring between server 3 an
server 4. After testing is completed switch over back to server 1 as primary with mirroring to server 2. Does that
help? TDPSQL_Newbie Feb 4 '14 at 16:27

Do I need to stop mirroring between server 1 and server 2 before dr from server 1 to server
3? TDPSQL_Newbie Feb 4 '14 at 17:22

Could you clarify which database are mirrored on each server and which is log shipped. KenWilson
18:56
Hi Ken Thank you for your time. DB1 is mirrored from server 1 to server 2. DB1 is log shipped from server 1 to ser
3. DB1 on server 3 is mirrored to DB1 on server 4. TDPSQL_Newbie Feb 4 '14 at 19:09
show 5 more comments
2 Answers
activeoldestvotes
up
vote1do
wn vote
Hi Ken:Thanks much. You have clarified my concerns. Please confirm if I understand this correctly. 1. copy only
backup will help be come back to current state if needed. 2. I have to remove mirroring to do swith over (I was not
clear abt this). 3. Restore the backup of tail with recovery back to db1 - is this if I do not want changes from dr testin
implemented with a switch back? Or is it restore this backup to log shipping db with recovery. I tested this but gettin
confirmation from an experienced SQL DBA is a big help :) TDPSQL_Newbie Feb 5 '14 at 20:23

1. Correct, using "WITH COPY_ONLY" will not break the backup sequence. 2. You do not HAVE to remove
mirroring but taking the tail-log backup will break mirroring so removing it will mitigate that issue. 3. Restoring the
tail-log backup with recovery will bring the log shipping database online so you can setup mirroring. At that point if
you do not want any changes made on server 3 to be on server 1 when you return to the current state then you would
need to use the copy only backup to restore to current state. Otherwise you can take a backup of DB1 on server 3 an
restore it to server 1. KenWilson Feb 6 '14 at 5:14

Thank you Ken for your support. It was helpful to get confirmations on my understanding. TDPSQL_Newbie
'14 at 17:52
add a comment

up In either case (Log Shipping or Mirroring) when you bring the DR server online for
vote0down testing any changes will be replicated back to the production server. If you don't
vote want this to happen you'll want to break the mirror or the log shipping and bring
the DR server online, and point some app servers/clients to it.

When you do this the users will be able to make changes to production and DR at
the same time, so be careful as to which one they are using.

When the DR test is done, you'll need to take the most recent backup from
production and restore it to DR again, rolling transaction logs forward then setup
mirroring or log shipping again from scratch.

You might also like