Bewerken

Delen via


Bidirectional Transactional Replication

Applies to: SQL Server Azure SQL Managed Instance

Bidirectional transactional replication is a specific transactional replication topology that allows two servers to exchange changes with each other: each server publishes data and then subscribes to a publication with the same data from the other server. The @loopback_detection parameter of sp_addsubscription (Transact-SQL) is set to TRUE to ensure that changes are only sent to the Subscriber and do not result in the change being sent back to the Publisher.

In SQL Server 2005 (9.x) and later versions, this topology is also supported by peer-to-peer transactional replication, but bidirectional replication can provide improved performance.

If you want to add a subscription to a bi-directional publication by using the the fully-qualified domain name (FQDN), verify that the server name (@@SERVERNAME) of the subscriber returns the FQDN. If the subscriber server name does not return the FQDN, changes that originate from that subscriber may cause primary key violations.