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


Using Differentials to set up mirroring


Using Differentials to set up mirroring

Author
Message
winston Smith
winston Smith
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1811 Visits: 2069
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?
adb2303
adb2303
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1290 Visits: 3150
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...
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88989 Visits: 45284
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, MVP, M.Sc (Comp Sci)
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


Perry Whittle
Perry Whittle
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20312 Visits: 17244
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" ;-)
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