Remotely cancels a subscription to a particular article within a publication, to a whole publication, or to all publications. It also removes all pending jobs from the distribution database.
sp_unsubscribe 'publication', 'article'
where
If the publication is restricted, running sp_unsubscribe causes the status for this subscription to be changed to inactive.
This example cancels a subscription to all articles and all publications.
sp_unsubscribe 'all', 'all'
Execute permission defaults to the system administrator and the database owner and is also granted to repl_subscriber.
sysarticles, syspublications, syssubscriptions, sysservers
sp_addsubscription | sp_dropsubscription |
sp_changesubscription | sp_helpsubscription |
sp_changesubstatus | sp_subscribe |