2

We set up transactional replication on a database that is part of an AlwaysOn Availability Group on our work environment:

  • The primary is SP1 and the secondary replica is SS2.
  • The distributor is on another server SD3. The replication is working fine.

We redirected the Original Publisher to the AG Listener Name using this script:

USE distribution;
GO  
EXEC sys.sp_redirect_publisher   
    @original_publisher = 'MyPublisher',  
    @publisher_db = 'MyPublishedDB',  
    @redirected_publisher = 'MyAGListenerName'; 

To implement this, we follow this documentation:

The problem is when we perform a failover from my primary SP1 to our secondary replica SS2. The replication monitor is still showing the information from the old primary SP1 (that became the secondary after the failover). And the more important is that the log reader picks up transactions from the old primary SP1. That means if SP1 server fails, replication will not work anymore.

Any idea? Have you made replication with an AG subscriber work? Recommendations or advice?

  • 1
    Did you redirect the distribution to use listener name ? – Kin Shah Feb 7 '17 at 12:08
  • Yes, we did it. Added the code and comment to the question. – Yaroslav Feb 8 '17 at 9:06
  • were you able to solve your issue? – andrews Jan 14 at 15:58
  • @andrews will say yes, but I was not involved on the solution, not longer on that position – Yaroslav Jan 14 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.