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

Mirroring Causing Replication Delay When Mirror Is Unavailable... Expand / Collapse
Author
Message
Posted Friday, March 18, 2011 12:29 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 18, 2011 1:27 PM
Points: 2, Visits: 41
Here's the scenario...
I have a database which is mirrored to another server. The PRIMARY also serves as a publisher for replication (using a remote distributor). The mirroring is using the HIGH PERFORMANCE operating mode so that all transactions are applied at the PRIMARY and then sent to the mirror.

The Issue...
If the mirror is unavailable, it would seem as though transactions are still not being applied at the primary. The reason I believe that is because while the mirror is unavailable, no transactions are sent from the publisher to the distributor in the replication scenario. There are no immediate warnings or alarms from the distributor as it simply sees that there are no transactions to distribute. If mirroring is stopped (or the mirror becomes available), transactions start flowing again, not only to the mirror obviously, but to the remote distributor.

Does anyone have any ideas on this or has experienced this behavior? If mirroring in HIGH SAFETY mode, I would almost expect this as under that mode, transactions are only applied at the principal once they have been sent to the mirror and the mirror acknowledges that said transactions were received and applied.

Any help or insight would be greatly appreciated!
Brian
Post #1080627
Posted Monday, October 29, 2012 11:23 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, December 11, 2013 9:30 AM
Points: 17, Visits: 172
I have experienced this same behavior with SQL 2008R2. I have databases mirrored in high performance mode, in "disconnected" state due to some firewall changes that were applied over the weekend. Transactional replication is not ....... replicating. Replication Monitor does not readily show any problems at all but inspection of the Log Reader Agent shows the following message "Replicated transactions are waiting for the next log backup or for mirroring partner to catch up". Inserting a Tracer Token shows that transactions are not getting delivered to the Distributor. All i can figure at this point is that the database transactions are still considered 'active' until the mirror site confirms reciept, and this is preventing replication from flowing changes to the subscribers. The mirroring connection is now fixed so once the mirrors are caught up on the backlog, i hope that replication will resume 'replicating'.


Post #1378380
Posted Monday, October 29, 2012 11:43 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, December 11, 2013 9:30 AM
Points: 17, Visits: 172
This behavior is by design. This excerpt from "SQL Server Replication: Providing High Availability using Database Mirroring" written by Paul Randal and Gopal Ashok, explains it well


"It is possible for the principal to become exposed (the mirror is accessible but there are log records that have not yet been hardened on the mirror) or isolated (the mirror is inaccessible). In both cases, if the principal is still able to serve the database, any changes made to the database are not replicated until the corresponding log records are hardened on the mirror.
This behavior introduces latency in the replication stream, and is done so that if a mirroring failover occurs, it is guaranteed that replication Subscribers cannot be “ahead” of the new principal database."



Post #1378389
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse