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

Using Differentials to set up mirroring Expand / Collapse
Author
Message
Posted Thursday, April 11, 2013 2:59 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 4:50 AM
Points: 904, Visits: 1,883
Ive set up mirroring many times with a full backup and a log backup or two.
Someone mentioned recently that you can set it up using a full backup, diff backup and any tran logs since the diff backup.

But this does not make senese to me as diff backups dont advance the log chain. I assumed that if i took a diff backup, and then took a log backup, they would both start from the same point. is that incorrect?
Post #1441140
Posted Thursday, April 11, 2013 3:50 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:47 AM
Points: 837, Visits: 2,460
I've never tried with a differential backup, but it makes sense that it should work: See the following from http://msdn.microsoft.com/en-us/library/ms187495.aspx:

1.Back up the active transaction log (known as the tail of the log). This creates a tail-log backup. If the active transaction log is unavailable, all transactions in that part of the log are lost.

2.Restore the most recent full database backup without recovering the database (RESTORE DATABASE database_name FROM backup_device WITH NORECOVERY).

3.If differential backups exist, restore the most recent one without recovering the database (RESTORE DATABASE database_name FROM differential_backup_device WITH NORECOVERY).

Restoring the most recent differential backup reduces the number of log backups that must be restored.

4.Starting with the first transaction log backup that was created after the backup you just restored, restore the logs in sequence with NORECOVERY.

5.Recover the database (RESTORE DATABASE database_name WITH RECOVERY). Alternatively, this step can be combined with restoring the last log backup.

Apart from step 5, this is where you want to be at when setting up the partner...
Post #1441161
Posted Thursday, April 11, 2013 5:52 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 11:31 AM
Points: 40,177, Visits: 36,578
That will work fine, but the only reason you'd do it is if there have been lots and lots of log backups since the full backup you used was taken and you don't want to have to restore all of those log backups.
You'd then use the full backup, the diff backup and all the log backups taken since the differential backup. It can be faster if you have many, many log backups to restore otherwise.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1441196
Posted Thursday, April 11, 2013 9:36 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:11 PM
Points: 6,466, Visits: 13,921
winston Smith (4/11/2013)
Ive set up mirroring many times with a full backup and a log backup or two.
Someone mentioned recently that you can set it up using a full backup, diff backup and any tran logs since the diff backup.

But this does not make senese to me as diff backups dont advance the log chain. I assumed that if i took a diff backup, and then took a log backup, they would both start from the same point. is that incorrect?

To add to Gail, differential backups do advance the diff base LSN and hence are used in combination with log backups as Gail has mentioned.


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1441333
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse