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.
sp_droparticle [ @publication = ] 'publication'
, [ @article = ] 'article'
[ , [ @ignore_distributor = ] ignore_distributor ]
[ , [ @force_invalidate_snapshot = ] force_invalidate_snapshot ]
[@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)
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.
Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_droparticle.