sp_droparticle

Transact-SQL Reference

Transact-SQL Reference

sp_droparticle

Drops an article from a snapshot or transactional publication. An article cannot be removed if one or more subscriptions to it exist. This stored procedure is executed at the Publisher on the publication database.

Syntax

sp_droparticle [ @publication = ] 'publication'
    ,
[ @article = ] 'article'
    
[ , [ @ignore_distributor = ] ignore_distributor ]
    [ , [ @force_invalidate_snapshot = ] force_invalidate_snapshot ]

Arguments

[@publication = ] 'publication'

Is the name of the publication that contains the article to be dropped. publication is sysname, with no default.

[@article = ] 'article'

Is the name of the article to be dropped. article is sysname, with no default.

[@ignore_distributor = ] ignore_distributor

For internal use only.

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_droparticle is used in all types of replication.

For horizontally filtered articles, sp_droparticle checks the type column of the article in the sysarticles table to determine whether a view or filter should also be dropped. If a view or filter was autogenerated, it is dropped with the article. If it was manually created, it is not dropped.

Permissions

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

See Also

sp_addarticle

sp_addpublication

sp_articlecolumn

sp_changearticle

sp_changepublication

sp_droppublication

sp_enumfullsubscribers

sp_helparticle

sp_helparticlecolumns

sp_helppublication

System Stored Procedures