Is the name of the Publisher database. publisher_db is sysname, with a default of NULL. publisher_db is ignored by Oracle Publishers.

[ @publication=] 'publication'

Is the name of the publication. publication is sysname, with no default.

[ @independent_agent=] 'independent_agent'

Specifies if there is a stand-alone Distribution Agent for this publication. independent_agent is nvarchar(5), with a default of TRUE. If true, there is a stand-alone Distribution Agent for this publication. If false, there is one Distribution Agent for each Publisher database/Subscriber database pair. independent_agent is a property of the publication and must have the same value here as it has at the Publisher.

[ @subscription_type=] 'subscription_type'

Is the type of subscription. subscription_type is nvarchar(9), with a default of anonymous. You must specify a value of pull for subscription_type, unless you want to create a subscription without registering the subscription at the Publisher. In this case, you must specify a value of anonymous. This is necessary for cases in which you cannot establish a SQL Server connection to the Publisher during subscription configuration.

[ @description=] 'description'

Is the description of the publication. description is nvarchar(100), with a default of NULL.

[ @update_mode=] 'update_mode'

Is the type of update. update_mode is nvarchar(30), and can be one of the following values.

Value

Description

read only (default)

The subscription is read-only. Any changes at the Subscriber will not be sent back to the Publisher. Should be used when updates will not be made at the Subscriber.

synctran

Enables support for immediate updating subscriptions.

queued tran

Enables the subscription for queued updating. Data modifications can be made at the Subscriber, stored in a queue, and then propagated to the Publisher.

failover

Enables the subscription for immediate updating with queued updating as a failover. Data modifications can be made at the Subscriber and propagated to the Publisher immediately. If the Publisher and Subscriber are not connected, data modifications made at the Subscriber can be stored in a queue until the Subscriber and Publisher are reconnected.

queued failover

Enables the subscription as a queued updating subscription with the ability to change to immediate updating mode. Data modifications can be made at the Subscriber and stored in a queue until a connection is established between the Subscriber and Publisher. When a continuous connection is established the updating mode can be changed to immediate updating. Not supported for Oracle Publishers.

[ @immediate_sync =] immediate_sync

Is whether the synchronization files are created or re-created each time the Snapshot Agent runs. immediate_sync is bit with a default of 1, and must be set to the same value as immediate_sync in sp_addpublication.immediate_sync is a property of the publication and must have the same value here as it has at the Publisher.

sp_addpullsubscription is used in snapshot replication and transactional replication.

Security Note

For queued updating subscriptions, use SQL Server Authentication for connections to Subscribers, and specify a different account for the connection to each Subscriber. When creating a pull subscription that supports queued updating, replication always sets the connection to use Windows Authentication (for pull subscriptions, replication cannot access metadata at the Subscriber required to use SQL Server Authentication). In this case, you should execute sp_changesubscription to change the connection to use SQL Server Authentication after the subscription is configured.