SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restore the primary database of a log shipping configuration


Restore the primary database of a log shipping configuration

Author
Message
James Brown-188103
James Brown-188103
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
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?
SQLSACT
SQLSACT
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2134 Visits: 2931
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
James Brown-188103
James Brown-188103
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
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?
SQLSACT
SQLSACT
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2134 Visits: 2931
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.
SQLSACT
SQLSACT
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2134 Visits: 2931
Transaction log backups, whether it's from Log Shipping or some other processes taking log backups amounts to the same thing.
James Brown-188103
James Brown-188103
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 22
Thanks. I'm going to suggest to the client that we give this a try on a test server.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search