sp_droparticle Replication Stored Procedure

Drops an article.

Syntax

sp_droparticle publication, article

where

publication
Is the name of the publication that contains the article to be dropped.
article
Is the name of the article to be dropped.

Remarks

An article cannot be removed if one or more subscriptions to it exist. Only the system administrator or the database owner can drop an article.

This stored procedure checks the article's type column 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.

Example

This example drops the article myarticle5 from the publication mypub.

sp_droparticle mypub, myarticle5

Permission

Execute permission defaults to the system administrator and the database owner.

Tables Used

sysobject, sysarticles, syspublications, syssubscriptions

See Also

sp_addarticle sp_droppublication
sp_addpublication sp_enumfullsubscribers
sp_articlecolumn sp_helparticle
sp_changearticle sp_helparticlecolumns
sp_changepublication sp_helppublication