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


Mirroring Causing Replication Delay When Mirror Is Unavailable...


Mirroring Causing Replication Delay When Mirror Is Unavailable...

Author
Message
Brian Lovejoy-382991
Brian Lovejoy-382991
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 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
nmederich
nmederich
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 203
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'.



nmederich
nmederich
SSC Rookie
SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)SSC Rookie (37 reputation)

Group: General Forum Members
Points: 37 Visits: 203
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."



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