Sample Header Ad - 728x90

Replication Subscribers and AlwaysOn Availability Groups (SQL Server)

2 votes
1 answer
1151 views
I have AlwaysOn Availability Groups configured with Replication Subscribers, and is currently running successfully with one publisher using the command below.
-- commands to execute at the publisher, in the publisher database:
EXEC sp_addsubscription 
    @publication = N'yocc_pub', 
    @subscriber = N'repl_agl', 
    @destination_db = N'YOCCDB', 
    @subscription_type = N'Push', 
    @sync_type = N'automatic', 
    @article = N'all', 
    @update_mode = N'read only', 
    @subscriber_type = 0;
GO
    
EXEC sp_addpushsubscription_agent 
    @publication = N'yocc_pub', 
    @subscriber = N'repl_agl', 
    @subscriber_db = N'YOCCDB', 
    @job_login = null, 
    @job_password = null, 
    @subscriber_security_mode = 1;
GO
All commands complete successfully. **My first problem** is "I want to add one more publisher " to the AlwaysOn subscriber but I am getting the error below: > **sql server error-21488 > sql server error-18752** **Note:-** - node-1 (AlwaysOn primary node and replication subscriber) - node-2 (secondary replica and report server) - node-3 (publisher 1)/yocc_pub(configured as distributor) - node-4 (publisher 2)/yocc_pub2(configured successfully except the two above errors - #21488, #18752) - listener name - repl_agl - database - yoccdb **Second problem-** How do I maintain primary key values to avoid conflicts between publisher 1 and publisher 2 when they sync with database on node-1?
Asked by Gulrez Khan (363 rep)
Jul 22, 2016, 06:13 AM
Last activity: May 8, 2024, 02:46 PM