简体   繁体   English

SQL Server事务复制到Alwayson组

[英]SQL Server transactional replication to Alwayson group

I have 3 servers. 我有3台服务器。

Server A, with a publication database, this server is not part of alwayon group, this server is the distributor 服务器A,具有发布数据库,该服务器不是alwayon组的一部分,该服务器是分发服务器

Server RT1 and RT2, those servers as part of alwayson group 服务器RT1和RT2,这些服务器作为Alwayson组的一部分

Listener RT, the listener have the subscription to Server A, and inside we have RT1 AND RT2 侦听器RT,侦听器具有对服务器A的订阅,并且在内部具有RT1和RT2

The issue is: RT2 is read only because is secondary replica, so all replication to this subscription will be in queue until the server will be primary(on failover) thats means when RT2 will be primary will take all replication in queue and start to replicate one by one then RT1 will be secondary with read only and the issues of the replication in queue 问题是:RT2是只读的,因为它是辅助副本,因此到该预订的所有复制都将在队列中,直到服务器成为主服务器(在故障转移时),这意味着RT2成为主服务器时将所有队列中的复制并开始复制。一个接一个的RT1将是只读的,并且复制的问题在队列中

If there is another way to configure the replication to Alwayson group that always replicate to primary server and in the case of failover switch the connection with no replications in queue for read only server? 如果还有另一种方法可以配置始终复制到主服务器的Alwayson组的复制,并且在故障转移的情况下切换只读服务器队列中没有复制的连接?

Note: Server A is not a part of alwayson group also Server A is the publisher, and RT1 or RT2 cannot be publishers 注意:服务器A不是Alwayson组的一部分,服务器A是发布者,RT1或RT2不能是发布者

Thanks in advance 提前致谢

When an AG listener is configured as a replication subscriber, the replication will flow to the primary node and then be synchronized to the secondary node. 将AG侦听器配置为复制订户时,复制将流到主节点,然后同步到辅助节点。 After a failover, the new primary node only has to process replicated transactions that occurred during the failover. 故障转移后,新的主节点只需处理故障转移期间发生的复制事务。

Check out these links for more information: 查看这些链接以获取更多信息:

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/configure-replication-for-always-on-availability-groups-sql-server https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/configure-replication-for-always-on-availability-groups-sql-server

https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/replication-subscribers-and-always-on-availability-groups-sql-server https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/replication-subscribers-and-always-on-availability-groups-sql-server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM