Subscribing to Publications

SQL Replication

Replication

Subscribing to Publications

A subscription is the request for data or database objects to be published to a specific Subscriber. A Subscriber can have several subscriptions to different publications.

A subscription defines what publication will be replicated, where and when. A subscription can be created either at the Publisher (a push subscription) or at the Subscriber (a pull subscription). Push subscriptions are then created and synchronized at the Publisher/Distributor and the synchronizing agent (Distribution Agent or Merge Agent) is typically run at the Distributor. Pull subscriptions and anonymous subscriptions are created and synchronized at the Subscriber and the synchronizing agent is typically run at the Subscriber.

When planning for subscriptions, consider where you want administration of the subscription to take place and where you want agent processing to occur. The type of subscription you choose controls where the agent runs, but in some circumstances, using remote agent activation, you can offload the synchronization agent processing to another server.

Additionally, be aware of publication and distribution database properties for subscription deactivation and expiration. For more information, see Subscription Deactivation and Expiration.

Subscription Characteristics Use When
Push Subscription With a push subscription, the Publisher propagates changes to a Subscriber without a request from the Subscriber. Changes can be pushed to Subscribers on demand, continuously, or on a scheduled basis. By default, the Distribution Agent or Merge Agent runs at the Distributor.

Because a Subscriber must explicitly be enabled at the Publisher to receive a push subscription, push subscriptions are known as named subscriptions.

  • Data will typically be synchronized on demand or on a frequently recurring schedule.

  • Publications require near real-time movement of data without polling.

  • The higher processor overhead at a Publisher using a local Distributor does not affect performance.

  • You need easier administration from a centralized location (the Distributor).

  • The centralized Distributor will establish the schedule on which connections will be made with remote, occasionally connected Subscribers.
Pull Subscription With a pull subscription, the Subscriber requests changes made at the Publisher. Pull subscriptions allow the user to determine when the data changes are synchronized. By default, the Distribution Agent or the Merge Agent runs at the Subscriber.

Because a Subscriber must explicitly be enabled at the Publisher to receive a push subscription, pull subscriptions are known as named subscriptions.

  • Administration of the subscription will take place at the Subscriber.

  • The publication has a large number of Subscribers (for example, Subscribers using the Internet), and when it would be too resource-intensive to run all the agents at one site or all at the Distributor.

  • Subscribers are autonomous, disconnected, and/or mobile. Subscribers will determine when they will connect to the Publisher/Distributor and synchronize changes.

  • Data will typically be synchronized on demand or on a schedule rather than continuously.
Anonymous Subscription An anonymous subscription is a type of pull subscription. Detailed information about the subscription and the Subscriber is not stored at the Publisher when using an anonymous subscription.

Instead, the Subscriber keeps information about the subscription and what the data was when the subscription was last synchronized. This information is then passed on to the Distributor when the next synchronization occurs.

The Subscriber does not need to be explicitly named at the Publisher when using anonymous subscriptions.

  • All of the rules for pull subscriptions apply to anonymous subscriptions.

  • Applications have a large number of Subscribers.

  • You do not want the overhead of maintaining extra information at the Publisher or Distributor.

  • If Subscribers use the Internet to access publications.