July 7, 2013 at 1:06 pm
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?
July 8, 2013 at 2:14 am
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
July 9, 2013 at 3:56 am
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?
July 9, 2013 at 4:01 am
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.
July 9, 2013 at 4:03 am
Transaction log backups, whether it's from Log Shipping or some other processes taking log backups amounts to the same thing.
July 9, 2013 at 2:07 pm
Thanks. I'm going to suggest to the client that we give this a try on a test server.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply