sp_addmergepullsubscription (T-SQL)

Adds a merge subscription of type pull.

Syntax

sp_addmergepullsubscription [@publication =] 'publication'
    
[,[@publisher =] 'publisher'] [,[@publisher_db =] 'publisher_db']
    [,[@subscriber_type =] 'subscriber_type']
    [,[@subscription_priority =] subscription_priority]
    [,[@sync_type =] 'sync_type'] [,[@description =] 'description']

Arguments
[@publication =] 'publication'
Is the name of the publication. publication is sysname, with no default.
[@publisher =] 'publisher'
Is the name of the Publisher. publisher is sysname, with a default of the local server name. The Publisher must be a valid server.
[@publisher_db =] 'publisher_db
Is the name of the Publisher database. publisher_db is sysname, with no valid default.
[@subscriber_type =] 'subscriber_type'
Is the type of Subscriber. subscriber_type is nvarchar(15), and can be one of these values.

 

Value Description
1 Global
2 (default) Local
3 Anonymous

[@subscription_priority =] subscription_priority
Is the subscription priority. subscription_priority is real, with a default of NULL. For local and anonymous subscriptions, the priority is 0.0. The priority is used by the default resolver to pick a winner when conflicts are detected.
[@sync_type =] 'sync_type'
Is the subscription synchronization type. sync_type is nvarchar(15), with a default of automatic. Can be automatic or nosync. If automatic, the schema and initial data are transferred to the Subscriber first. If nosync, it is assumed the Subscriber already has the schema and initial data.
[@description =] 'description'
Is a brief description of this pull subscription. description is nvarchar(255), with a default of NULL.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_addmergepullsubscription is used for merge replication.

sp_addmergepullsubscription implements similar functionality to sp_addmergesubscription regarding pull subscriptions, except that it does not create an agent for this subscription. The current server name and current database name are assumed to be subscriber and subscriber_db, and they do not appear in the parameter list.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_addmergepullsubscription.

See Also
sp_changemergepullsubscription sp_helpmergepullsubscription
sp_dropmergepullsubscription System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.