Queued updating subscriptions

03-Jun-2017 06:43

Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Transactional replication enables changes made at a Subscriber to be propagated back to the Publisher using either immediate or queued updating subscriptions.

The following conflicts can occur: When creating a publication and enabling queued updating, replication adds a uniqueidentifier column (msrepl_tran_version) with the default of newid() to the underlying table.When published data is changed at either the Publisher or the Subscriber, the row receives a new globally unique identifier (GUID) to indicate that a new row version exists.The Queue Reader Agent uses this column during synchronization to determine if a conflict exists.DECLARE @publication AS sysname; DECLARE @subscription DB AS sysname; DECLARE @subscriber AS sysname; SET @publication = N' Adv Works Product Tran'; SET @subscription DB = N' Adventure Works2008R2Replica'; SET @subscriber = $(Sub Server); -- At the Publisher, register the subscription, using the defaults.

Configure updatable subscriptions on the Updatable Subscriptions page of the New Subscription Wizard.

EXEC sp_addpublication_snapshot @publication = @publication, @job_login = @login, @job_password = @password, -- Explicitly specify the use of Windows Integrated Authentication (default) -- when connecting to the Publisher.