Failback from log shipping

If I do a test failover from my primary to the secondary, can I just take a tail log backup of the secondary and restore that to the primary without a full backup restore?

more ▼

asked Nov 30, 2009 at 08:09 PM in Default

avatar image

Steve Jones - Editor ♦♦
5.2k 79 94 87

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

The way I do it is like this (having suspended the log shipping first, of course):

Before failing over, backup the primary database's log and put the database in standby mode:

use master;
backup  log dwtest 
to  disk = N'\\db1\logshipbackup\dwtest_logtail.trn' 
with    standby = N'\\db1\logshipstandby\ROLLBACK_UNDO_dwtest.BAK';

Bring the standby on-line by restoring that backup and recovering the database:

use master;
restore log dwtest 
from    disk = N'\\db1\logshipbackup\dwtest_logtail.trn' 
with    recovery;

The databases are now in the same state and the standby is ready for use. After testing, reverse the process to fail back.

more ▼

answered Dec 01, 2009 at 11:05 AM

avatar image

David Wimbush
10.7k 31 34 43

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Nov 30, 2009 at 08:09 PM

Seen: 2364 times

Last Updated: Nov 30, 2009 at 08:09 PM

Copyright 2018 Redgate Software. Privacy Policy