Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Restore the primary database of a log shipping configuration Expand / Collapse
Author
Message
Posted Sunday, July 7, 2013 1:06 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 19, 2014 8:21 AM
Points: 6, Visits: 22
I support a company that is using Log Shipping setup by the previous DBA. The log shipping is setup to do the default transaction log backup/ship each 15 min’s, 24 hours a day. Each night I do a Full backup of the Primary database which takes about 30-50 min’s. So during this backup the log backup/ship has occurred several times.

If I should ever be called upon to restore from that previous nights backup I’m not sure how I would proceed. I’ve Googled this and seen that first you should turn Log Shipping off at the primary server, which makes sense. But after I restored the previous nights backup where would I go from there? Could I start restoring those log ship transaction backups? But where would I start, the one after the Full was done, or the first after it started?
Post #1470983
Posted Monday, July 8, 2013 2:13 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 3:14 AM
Points: 1,375, Visits: 2,670
If you restore the secondary database from a full backup taken at the primary, provided that all the transaction log backups are in place, SQL Server will do the work.

When the Log Shipping restore job runs after the secondary database has been restored, SQL Server checks all the transaction log files in the folder specified in the Log Shipping config and then starts to restore the required logs.

regards
Post #1471082
Posted Tuesday, July 9, 2013 3:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 19, 2014 8:21 AM
Points: 6, Visits: 22
OK, I need to clarify the situation I’m trying to figure out with a example:

Full backup of primary is done each night, during which Log Shipping occurs on its 15 min schedule to the secondary’s.
10 AM the next day users slam the primary database somehow. Secondary’s duplicate the same error 15 min’s later.
11 AM they realize their error and they want me to restore the previous night’s backup, to the primary, and apply transaction logs up till 9 AM before they messed up.

So my question really is; can Log Shipping transaction backups be used to accomplish this? Would I need to change the LS Transaction backup schedule to stop while the full backup is in progress, so there is a clear starting point?

Post #1471514
Posted Tuesday, July 9, 2013 4:01 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 3:14 AM
Points: 1,375, Visits: 2,670
Yes you can.

Restore the previous nights backup and manually restore each transaction log up until the desired point.

You will however need to re-sync log shipping.
Post #1471516
Posted Tuesday, July 9, 2013 4:03 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 3:14 AM
Points: 1,375, Visits: 2,670
Transaction log backups, whether it's from Log Shipping or some other processes taking log backups amounts to the same thing.
Post #1471518
Posted Tuesday, July 9, 2013 2:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 19, 2014 8:21 AM
Points: 6, Visits: 22
Thanks. I'm going to suggest to the client that we give this a try on a test server.
Post #1471841
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse