sp_dropmergearticle
Removes an article from a merge publication. This stored procedure is executed at the Publisher on the publication database.
Syntax
sp_dropmergearticle [ @publication = ] 'publication'
, [ @article = ] 'article'
[ , [ @ignore_distributor = ] ignore_distributor
[ , [ @reserved = ] reserved
[ , [ @force_invalidate_snapshot = ] force_invalidate_snapshot ]
Arguments
[@publication = ] 'publication'
Is the name of the publication from which to drop an article. publication is sysname, with no default.
[@article = ] 'article'
Is the name of the article to drop from the given publication. article is sysname, with no default. If all, all existing articles in the specified merge publication are removed. Even if article is all, the publication still must be dropped separately from the article.
[@ignore_distributor = ] ignore_distributor
Indicates whether this stored procedure is executed without connecting to the Distributor. ignore_distributor is bit, with a default of 0.
[@reserved = ] reserved
Is reserved for future use. reserved is nvarchar(20), with a default of NULL.
[@force_invalidate_snapshot = ] force_invalidate_snapshot
Enables or disables the ability to have a snapshot invalidated. force_invalidate_snapshot is a bit, with a default 0. 0 specifies that changes to the merge article will not cause the snapshot to be invalid. 1 means that changes to the merge article may cause the snapshot to be invalid, and if that is the case, a value of 1 gives permission for the new snapshot to occur.
Return Code Values
0 (success) or 1 (failure)
Remarks
sp_dropmergearticle is used in merge replication. sp_dropmergearticle is allowed only when there is no active subscription for the current publication. If there is an existing subscription, dropping an article or articles is not allowed.
Permissions
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_dropmergearticle.