sp_dropsubscription Replication Stored Procedure

Drops subscriptions to a particular article, publication, or set of subscriptions on the publication server.

Syntax

sp_dropsubscription 'publication', 'article', 'subscriber'

where

publication
Is the name of the associated publication. Specifying all cancels all subscriptions for all publications for the specified subscriber.
article
Is the name of the article. Specifying all drops subscriptions to all articles for each specified publication and subscriber. If article is not supplied, subscriptions are dropped for all articles in the publication.
subscriber
Is the name of the subscription server that will have its subscriptions dropped. Specifying all drops all subscriptions for all subscribers.

Remarks

Only the system administrator, database owner, and a remote connection from the subscription server can drop a subscription to an existing publication or article.

Examples

This example drops all articles from all publications and drops all subscriptions for all subscribers.

sp_dropsubscription 'all', 'all', 'all'

Permission

Execute permission defaults to the system administrator and database owner.

Tables Used

sysarticles, syspublications, syssubscriptions, sysservers

See Also

sp_addsubscription sp_helpsubscription
sp_changesubscription sp_subscribe
sp_changesubstatus sp_unsubscribe