Transact-SQL Reference

sp_droppublication

Drops a publication and its associated articles. This stored procedure is executed at the Publisher on the publication database.

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 replication 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_addpublication

sp_articlecolumn

sp_changearticle

sp_changepublication

sp_droparticle

sp_enumfullsubscribers

sp_helparticle

sp_helparticlecolumns

sp_helppublication

System Stored Procedures

'

Comments ( )
Link to this page: //www.vb-net.com/Sql/Sql/Ts_sp_repl2_617y.htm
< THANKS ME>