SQL Server Transactional Replication Distributor on Basic Availability Group

2020-12-16T15:50:15.743+00:00

I am trying to create a transactional replication distributor environment on a 2 node Basic Availability Group (SQL Server 2016 SP2 CU15). The doc configure-distribution-availability-group

states that:
All secondary replicas in a distribution database AG should be readable. If a secondary replica is not readable, distributor properties in SQL Server Management Studio on the particular secondary replica can not be accessed, however replication will continue to work correctly.

When I try to setup the secondary node with the SP_ADDDISTPUBLISHER command I get the following error:

Msg 25036, Level 16, State 1, Procedure sp_adddistpublisher, Line 51 [Batch Start Line 46]
Distribution database needs to be in readable state on secondary replica, when distribution database is part of availability group.

So is what I am trying to achieve actually possible with a basic availability group and if so, how do I get around this ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,791 questions
{count} votes

Accepted answer
  1. CathyJi-MSFT 22,201 Reputation points Microsoft Vendor
    2020-12-17T03:00:43.103+00:00

    Hi @England, SCOTT (Secure Solutions & Services) ,

    According to MS document, If a replica is not readable as a secondary, perform failover such that the replica becomes the primary, and run

    sp_adddistpublisher @publisher= 'PUB', @distribution_db= 'distribution', @working_directory= '<network path>'  
    

    This is an old thread, check if it could help you.

    Best regards,
    Cathy


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Ben Miller (DBAduck) 956 Reputation points
    2020-12-16T16:41:09.913+00:00
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.