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

DB mirroring and Log backup chain Expand / Collapse
Author
Message
Posted Monday, November 14, 2011 7:59 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, November 20, 2011 11:04 AM
Points: 13, Visits: 37
In case of a Log Shipping, I'm aware that if you do if you do T-Log backup maybe through maintenance plan on the same machine (Primary), it will break the log backup chain on the secondary machine that receives the log.

However, in case of DB mirroring, if you do T-Log backup on the Mirroring Principal, does that break the log chain on the Mirroring Partner?
Post #1205163
Posted Monday, November 14, 2011 8:05 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 @ 7:59 AM
Points: 41,530, Visits: 34,447
There's no 'log chain' on a mirroring partner. Mirroring doesn't depend on log backups to copy transactions across (as log shipping does). You can't take log backups on a mirror DB (it's not online), only on the principal.


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 #1205168
Posted Monday, November 14, 2011 8:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, November 20, 2011 11:04 AM
Points: 13, Visits: 37
GilaMonster (11/14/2011)
There's no 'log chain' on a mirroring partner. Mirroring doesn't depend on log backups to copy transactions across (as log shipping does). You can't take log backups on a mirror DB (it's not online), only on the principal.


Ok.

So it means that it will not mess up the mirrored database on the Mirroring partner if you do T-Log backup on the mirroring principal. Right?
Post #1205177
Posted Monday, November 14, 2011 8:18 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 @ 7:59 AM
Points: 41,530, Visits: 34,447
Yup.

But if you don't do log backups, it will mess up your principal. Log full errors aren't fun and the only thing that marks the log reusable in full recovery is a log backup.



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 #1205196
Posted Wednesday, April 04, 2012 7:32 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 10:29 AM
Points: 1,592, Visits: 1,488
Just to clarify 1 point: there is a log chain on the mirror database. It has the exact same log chain as the principal. Without it, you wouldn't be able to fail over and bring the mirror online. Also, database mirroring will not allow you to do anything that will break the log chain. If you try to do something that would break the log chain, you will receive an error that you can't do that while the database is mirrored.

Another point: Taking a manual log backup of the log shipping primary does not break the log chain. what causes log shipping to fail is that the automated processes may not copy and restore that log backup causing a gap in the log sequence number on the secondary. You can remedy this by manually restoring (with NORECOVERY) the manual log backup on the secondary or by taking a differential backup that spans the missing gap and restoring it (with NORECOVERY) manually to secondary. After doing this, log shipping processes will be able to resume normal processing.

If you do need to take an out of band backup, it is recommended that you use the COPY_ONLY option as this generates the backup without updating the last LSN backed up.




My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master: SQL Server 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #1278049
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse