Transact-SQL Reference

sp_droppullsubscription

Drops a subscription at the current database of the Subscriber. This stored procedure is executed at the Subscriber on the pull subscription database.

Syntax

sp_droppullsubscription [ @publisher = ] 'publisher'
    , [ @publisher_db = ] 'publisher_db'
    , [ @publication = ] 'publication'
    
[ , [ @reserved = ] reserved ]

Arguments

[@publisher = ] 'publisher'

Is the remote server name. publisher is sysname, with no default. If all, the subscription is dropped at all the Publishers.

[@publisher_db = ] 'publisher_db'

Is the name of the Publisher database. publisher_db is sysname, with no default. all means all the Publisher databases.

[@publication = ] 'publication'

Is the publication name. publication is sysname, with no default. If all, the subscription is dropped to all the publications.

[@reserved = ] reserved

For internal use only.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_droppullsubscription is used in snapshot replication and transactional replication.

sp_droppullsubscription deletes the corresponding row in the MSreplication_subscriptions table and the corresponding Distributor Agent at the Subscriber. If no rows are left in Msreplication_subscriptions, it drops the table.

Permissions

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

See Also

sp_addpullsubscription

System Stored Procedures