sp_helparticle (Transact-SQL)

Applies to: SQL Server Azure SQL Managed Instance

Displays information about an article. This stored procedure is executed at the Publisher on the publication database. For Oracle Publishers, this stored procedure is executed at the Distributor on any database.

Transact-SQL syntax conventions

Syntax

sp_helparticle
    [ @publication = ] N'publication'
    [ , [ @article = ] N'article' ]
    [ , [ @returnfilter = ] returnfilter ]
    [ , [ @publisher = ] N'publisher' ]
    [ , [ @found = ] found OUTPUT ]
[ ; ]

Arguments

[ @publication = ] N'publication'

The name of the publication. @publication is sysname, with no default.

[ @article = ] N'article'

The name of an article in the publication. @article is sysname, with a default of %. If @article isn't supplied, information on all articles for the specified publication is returned.

[ @returnfilter = ] returnfilter

Specifies whether the filter clause should be returned. @returnfilter is bit, with a default of 1, which returns the filter clause.

[ @publisher = ] N'publisher'

Specifies a non-SQL Server publisher. @publisher is sysname, with a default of NULL.

@publisher shouldn't be specified when requesting information on an article published by a SQL Server Publisher.

[ @found = ] found OUTPUT

Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.

Result set

Column name Data type Description
article id int ID of the article.
article name sysname Name of the article.
base object nvarchar(257) Name of the underlying table represented by the article or stored procedure.
destination object sysname Name of the destination (subscription) table.
synchronization object nvarchar(257) Name of the view that defines the published article.
type smallint The type of article:

1 = Log-based.
3 = Log-based with manual filter.
5 = Log-based with manual view.
7 = Log-based with manual filter and manual view.
8 = Stored procedure execution.
24 = Serializable stored procedure execution.
32 = Stored procedure (schema only).
64 = View (schema only).
96 = Aggregate function (schema only).
128 = Function (schema only).
257 = Log-based indexed view.
259 = Log-based indexed view with manual filter.
261 = Log-based indexed view with manual view.
263 = Log-based indexed view with manual filter and manual view.
320 = Indexed view (schema only).
status tinyint Can be the & (Bitwise AND) result of one or more or these article properties:

0x00 = Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
0x01 = Article is active.
0x08 = Include the column name in insert statements.
0x16 = Use parameterized statements.
0x32 = Use parameterized statements and include the column name in insert statements.
filter nvarchar(257) Stored procedure used to horizontally filter the table. This stored procedure must be created using the FOR REPLICATION clause.
description nvarchar(255) Descriptive entry for the article.
insert_command nvarchar(255) The replication command type used when replicating inserts with table articles. 1
update_command nvarchar(255) The replication command type used when replicating updates with table articles. 1
delete_command nvarchar(255) The replication command type used when replicating deletes with table articles. 1
creation script path nvarchar(255) Path and name of an article schema script used to create target tables.
vertical partition bit Is whether vertical partitioning is enabled for the article; where a value of 1 means that vertical partitioning is enabled.
pre_creation_cmd tinyint Precreation command for DROP TABLE, DELETE TABLE, or TRUNCATE TABLE.
filter_clause ntext WHERE clause specifying the horizontal filtering.
schema_option binary(8) Bitmap of the schema generation option for the given article. For a complete list of schema_option values, see sp_addarticle.
dest_owner sysname Name of the owner of the destination object.
source_owner sysname Owner of the source object.
unqua_source_object sysname Name of the source object, without the owner name.
sync_object_owner sysname Owner of the view that defines the published article.
unqualified_sync_object sysname Name of the view that defines the published article, without the owner name.
filter_owner sysname Owner of the filter.
unqua_filter sysname Name of the filter, without the owner name.
auto_identity_range int Flag indicating if automatic identity range handling was turned on at the publication at the time it was created. 1 means that automatic identity range is enabled; 0 means it's disabled.
publisher_identity_range int Range size of the identity range at the Publisher if the article has identityrangemanagementoption set to auto or auto_identity_range set to true.
identity_range bigint Range size of the identity range at the Subscriber if the article has identityrangemanagementoption set to auto or auto_identity_range set to true.
threshold bigint Percentage value indicating when the Distribution Agent assigns a new identity range.
identityrangemanagementoption int Indicates the identity range management handled for the article.
fire_triggers_on_snapshot bit Is if replicated user triggers are executed when the initial snapshot is applied.

1 = user triggers are executed.
0 = user triggers aren't executed.

1 For more information, see Transactional Articles - Specify How Changes Are Propagated.

Return code values

0 (success) or 1 (failure).

Remarks

sp_helparticle is used in snapshot replication and transactional replication.

Permissions

Only members of the sysadmin fixed server role, the db_owner fixed database role, or the publication access list for the current publication can execute sp_helparticle.

Examples

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

USE [AdventureWorks2022]
EXEC sp_helparticle
  @publication = @publication;
GO