sp_helpmergearticle (Transact-SQL)
TOC
Collapse the table of content
Expand the table of content

sp_helpmergearticle (Transact-SQL)

 

Applies To: SQL Server

Returns information about an article. This stored procedure is executed at the Publisher on the publication database or at a republishing Subscriber on the subscription database.

Topic link icon Transact-SQL Syntax Conventions

  
sp_helpmergearticle [ [ @publication = ] 'publication' ]  
    [ , [ @article= ] 'article' ]  

[ @publication=] 'publication'
Is the name of the publication about which to retrieve information. publicationis sysname, with a default of %, which returns information about all merge articles contained in all publications in the current database.

[ @article=] 'article'
Is the name of the article for which to return information. articleis sysname, with a default of %, which returns information about all merge articles in the given publication.

Column nameData typeDescription
idintArticle identifier.
namesysnameName of the article.
source_ownersysnameName of the owner of the source object.
source_objectsysnameName of the source object from which to add the article.
sync_object_ownersysnameName of the owner of the view that defines the published article.
sync_objectsysnameName of the custom object used to establish the initial data for the partition.
descriptionnvarchar(255)Description of the article.
statustinyintStatus of the article, which can be one of the following:

 1 = inactive

 2 = active

 5 = data definition language (DDL) operation pending

 6 = DDL operation with a newly generated snapshot

Note: When an article is reinitialized, values of 5 and 6 are changed to 2.
creation_scriptnvarchar(255)Path and name of an optional article schema script used to create the article in the subscription database.
conflict_tablenvarchar(270)Name of the table storing the insert or update conflicts.
article_resolvernvarchar(255)Custom resolver for the article.
subset_filterclausenvarchar(1000)WHERE clause specifying the horizontal filtering.
pre_creation_commandtinyintPre-creation method, which can be one of the following:

 0 = none

 1 = drop

 2 = delete

 3 = truncate
schema_optionbinary(8)Bitmap of the schema generation option for the article. For information about this bitmap option, see sp_addmergearticle or sp_changemergearticle.
typesmallintType of article, which can be one of the following:

 10 = table

 32 = stored procedure

 64 = view or indexed view

 128 = user defined function

 160 = synonym schema only
column_trackingintSetting for column-level tracking; where 1 means that column-level tracking is on, and 0 means that column-level tracking is off.
resolver_infonvarchar(255)Name of the article resolver.
vertical_partitionbitIf the article is vertically partitioned; where 1 means that the article is vertically partitioned, and 0 means that it is not.
destination_ownersysnameOwner of the destination object. Applicable to merge stored procedures, views, and user-defined function (UDF) schema articles only.
identity_supportintIf automatic identity range handling is enabled; where 1 is enabled and 0 is disabled.
pub_identity_rangebigintThe range size to use when assigning new identity values. For more information, see the "Merge Replication" section of Replicate Identity Columns.
identity_rangebigintThe range size to use when assigning new identity values. For more information, see the "Merge Replication" section of Replicate Identity Columns.
thresholdintPercentage value used for Subscribers running SQL Server Compact or previous versions of SQL Server. threshold controls when the Merge Agent assigns a new identity range. When the percentage of values specified in threshold is used, the Merge Agent creates a new identity range. For more information, see the "Merge Replication" section of Replicate Identity Columns.
verify_resolver_signatureintIf a digital signature is verified before using a resolver in merge replication; where 0 means that the signature is not verified, and 1 means that the signature is verified to see if it is from a trusted source.
destination_objectsysnameName of the destination object. Applicable to merge stored procedures, views, and UDF schema articles only.
allow_interactive_resolverintIf the Interactive Resolver is used on an article; where 1 means that this resolver is used, and 0 means that it is not used.
fast_multicol_updateprocintEnables or disables the Merge Agent to apply changes to multiple columns in the same row in one UPDATE statement; where 1 means that multiple columns are updated in one statement, and 0 means that separate UPDATE statements are issues for each updated column.
check_permissionsintInteger value that represents the bitmap of the table-level permissions that are verified. For a list of possible values, see sp_addmergearticle (Transact-SQL).
processing_orderintThe order in which data changes are applied to articles in a publication.
upload_optionstinyintDefines restrictions on updates made at a Subscriber with a client subscription, which can be one of the following values.

 0 = There are no restrictions on updates made at a Subscriber with a client subscription; all changes are uploaded to the Publisher.

 1 = Changes are allowed at a Subscriber with a client subscription, but they are not uploaded to the Publisher.

 2 = Changes are not allowed at a Subscriber with a client subscription.

For more information, see Optimize Merge Replication Performance with Download-Only Articles.
identityrangemanagementoptionintIf automatic identity range handling is enabled; where 1 is enabled and 0 is disabled.
delete_trackingbitIf deletes are replicated; where 1 means that deletes are replicated, and 0 means that they are not.
compensate_for_errorsbitIndicates if compensating actions are taken when errors are encountered during synchronization; where 1 indicates that compensating actions are taken, and 0 means that compensating actions are not taken.
partition_optionstinyintDefines the way in which data in the article is partitioned, which enables performance optimizations when all rows belong in only one partition or in only one subscription. partition_options can be one of the following values.

 0 = The filtering for the article either is static or does not yield a unique subset of data for each partition; that is, it is an "overlapping" partition.

 1 = The partitions are overlapping, and data manipulation language (DML) updates made at the Subscriber cannot change the partition to which a row belongs.

 2 = The filtering for the article yields non-overlapping partitions, but multiple Subscribers can receive the same partition.

 3 = The filtering for the article yields non-overlapping partitions that are unique for each subscription.
artiduniqueidentifierAn identifier that uniquely identifies the article.
pubiduniqueidentifierAn identifier that uniquely identifies the publication in which the article is published.
stream_blob_columnsbitIs if the data stream optimization is being used when replicating binary large object columns. 1 means that the optimization is being used, and 0 means that the optimization is not being used.

0 (success) or 1 (failure)

sp_helpmergearticle is used in merge replication.

Only members of the db_owner fixed database role in the publication database, the replmonitor role in the distribution database, or the publication access list for a publication can execute sp_helpmergearticle.

DECLARE @publication AS sysname;
SET @publication = N'AdvWorksSalesOrdersMerge';

USE [AdventureWorks2012]
EXEC sp_helpmergearticle
  @publication = @publication;
GO

View and Modify Article Properties
sp_addmergearticle (Transact-SQL)
sp_changemergearticle (Transact-SQL)
sp_dropmergearticle (Transact-SQL)
Replication Stored Procedures (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft