What are Merge Replication Anonymous Subscribers

José Moreira Neto
Microsoft SQL Server Escalation Services

Particularities of Merge Anonymous Subscribers

In Merge Replication, anonymous subscriptions are required if you want to create a subscription without registering the subscription at the Publisher. This is necessary for cases in which you cannot establish a SQL Server connection to the Publisher during subscription configuration.

If you are using an anonymous subscription, the Publisher does not store meta data about the Subscriber. All meta data is maintained at the Subscriber. This results in the following differences:

1. Anonymous pull subscribers databases cannot be restored and catch up from the publisher’s delta. The Publisher applies the uploaded changes as it does in a non-anonymous situation, but it does not locally store the generation values that are exchanged. Consequently, the determination of the generations to be exchanged relies solely upon the generation information stored at the Subscriber. If the Subscriber does not have this information there is no way to determine the delta to synchronize.

In a regular pull environment. The subscriber’s changes (delta) will flow back to the publisher because there is a common generation and replication can resume from where the database was restored.

In an anonymous environment, the subscriber cannot be restored because the common generation is unknown. All changes have to be redelivered.

2. The Publisher takes authorship of all uploaded changes from “anonymous” subscription. In subsequent merges with other Subscribers, these changes look as though they originated at the Publisher. 

3. In case of conflicting changes made by two anonymous subscribers, “first one to merge with Publisher” wins the conflict.

4. In setting up a new subscriber: In a Pull setup - sp_addmergesubscription - the proc has to be run on the publication. In an anonymous setup - no procedure has to be run on the publisher. The subscriber can subscribe himself without access to the publisher directly, such as in the case of Web Synchronization.

Transaction Replication Side Note: To use this option for snapshot and transactional publications, the option Snapshot always available must be set to True.  This can lead to increase in the Distribution Database size as the cleanup will not purge data until the Publication Retention period.

See Also: How Merge Replication Tracks and Enumerates Changes