Export (0) Print
Expand All

Step 4: Create Subscriptions with Cycle Detection Enabled

SQL Server 2000

To create subscriptions with cycle detection enabled, add a transactional subscription to each database with @loopback_detection set to TRUE, so that the Distribution Agent does not send transactions that originated at the Subscriber back to the Subscriber.

Examples
1. Add the transactional subscription in test1
USE test1
GO

EXEC sp_addsubscription @publication = N'two_way_pub_test1', 
    @article = N'all', @subscriber = @@SERVERNAME, 
    @destination_db = N'test2', @sync_type = N'none', 
    @status = N'active', @update_mode = N'read only', 
    @loopback_detection = 'true'
GO
2. Add the transactional subscription in test2
USE test2
GO

EXEC sp_addsubscription @publication = N'two_way_pub_test2', 
    @article = N'all', @subscriber = @@SERVERNAME, 
    @destination_db = N'test1', @sync_type = N'none', 
    @status = N'active', @update_mode = N'read only', 
    @loopback_detection = 'true'
GO
Show:
© 2014 Microsoft