sp_droppublication (T-SQL)

Drops a publication and its associated articles.

Syntax

sp_droppublication [@publication =] 'publication'
    [,[@ignore_distributor =] ignore_distributor]

Arguments
[@publication =] 'publication'
Is the name of the publication to be dropped. publication is sysname, with no default. If all is specified, all publications are dropped from the publication database, except for those with subscriptions.
[@ignore_distributor =] ignore_distributor
For internal use only.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_droppublication is used in snapshot and transactional replication.

sp_droppublication recursively drops all articles associated with a publication and then drops the publication itself. A publication cannot be removed if it has one or more subscriptions to it. The associated sync task is also dropped.

Permissions

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

See Also
sp_addarticle sp_enumfullsubscribers
sp_addpublication sp_helparticle
sp_articlecolumn sp_helparticlecolumns
sp_changearticle sp_helppublication
sp_changepublication System Stored Procedures
sp_droparticle  

  


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