sp_dropmergesubscription (T-SQL)

Drops a subscription to a merge publication and its associated Merge Agent.

Syntax

sp_dropmergesubscription [[@publication =] 'publication']
    [,[@subscriber =] 'subscriber' [,[@subscriber_db =] 'subscriber_db']
    [,[@subscription_type =] 'subscription_type']
    [,[@ignore_distributor =] ignore_distributor]

Arguments
[@publication =] 'publication'
Is the publication name. publication is sysname, with a default of NULL. The publication must already exist and conform to the rules for identifiers.
[@subscriber =] 'subscriber'
Is the name of the Subscriber. subscriber is sysname, with a default of NULL.
[@subscriber_db =] 'subscriber_db'
Is the name of the subscription database. subscription_database is sysname, with a default of NULL.
[@subscription_type =] 'subscription_type'
Is the type of subscription. subscription_type is nvarchar(15), and can be one of these values.

 

Value Description
push (default) Push subscription
pull Pull subscription
both Both a push and pull subscription

[@ignore_distributor =] ignore_distributor
Indicates whether this stored procedure is executed without connecting to the Distributor. ignore_distributor is bit, with a default of 0. This parameter can be used to drop a subscription without doing cleanup tasks at the Distributor. It is also useful if you had to reinstall the Distributor.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_dropmergesubscription is used in merge replication.

Permissions

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

See Also
sp_addmergesubscription sp_helpmergesubscription
sp_changemergesubscription System Stored Procedures

  


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