Quantcast
Channel: Forum SQL Server Setup & Upgrade
Viewing all articles
Browse latest Browse all 7532

A few transactional log shipping and DB Backup best practices questions

$
0
0

Hi all,

Disclaimer: Please forgive me on these questions (I feel that they are rather core to how backups and log shipping works in SQL and I should have gotten a better understanding of them by reading through MSDN documents, however my reading through the relative material just resulted in more confusion and questions)

I am trying to understand what the recommended approach is for a scenario where I am maintaining a hot backup of our DBs but at the same would like to be able to restore the DBs on our staging or development environments on demand. Let me try to give a little background on my current configuration:

We currently have about 15 databases (all SQL 2008 R2) we have enabled transactional log shipping on these databases to our secondary location. In addition we have maintenance plans created for weekly fully backups and daily differential backups on these databases.

Question 1: I currently use a separate job for each DB for backing up, copying, and finally restoring log shipping (this results in 3x15 about 45 jobs) Is this the recommended approach ? (It seems like at the least the copy operation should be done with a single job rather then multiple jobs to optimize the network usage as the traffic is going to a secondary data center at a different physical location), but if I use this approach and then go and delete one of the log shipping configurations wouldn't this also remove the copy job which will effect all DBs ?

Question 2: I have setup maintenance plans which take weekly full DB backups and daily differential backups, please help me understand what setting the expiration date for these plans do. Reading the MSDN documentation it say this will determine when the file will be overwritten however I am confused by this statement, in summary I am trying to understand how SQL determines which full backup file the differential backups are based off of and when it is actually safe to delete a file.  For example if I take a full backups every Sunday at 1:00 AM, and I have a different scheduled task which takes differential backups daily at 1:00 AM how does differential job know the which sunday full backup at 1:00 AM completed successfully (say you kept your bkp files around for 3 weeks you would end up with 3 .bkp files to choose from) and that it should be using that file as what it should base itself off of ?

Question 3: Building onto question 2, when using a once a week full backup and daily differential backups, is each daily differential backup cumulative of all the changes from previous differential backups or do you need all differential backups to that day to be able to bring a DB up to date ? ( so if I want to restore to a point in time on Wednesday do I need the full back up from last Sunday plus the differential backups from Monday and Tuesday or do I just need the differential backup from Tuesday ?)

Question 4: Because I enabled transaction log shipping it is my understanding that I should NOT be using a transactional log backup maintenance task in addition to this approach (there is also a note in the log shipping configuration which says "If you backup the transaction logs of this database with any other job or maintenance plan, Management studio will not be able to restore the backups on the secondary sever instances"). So given this how does one go about creating an up to date replica of our DB for staging or development use ? My assumption is you would take the most recent full backup then figure out which differential backups to use, however after that what do you do about which transaction logs you should be applying (it seems that the transaction logs generated for log shipping do not really line up with the differential backups created with the maintenance plan) ?

Thank you in advance for guidance.



Viewing all articles
Browse latest Browse all 7532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>