sysmergeschemaarticles (Transact-SQL)


Applies To: SQL Server

Tracks schema-only articles for merge replication. This table is stored in the publication and subscription databases.

Column nameData typeDescription
namesysnameThe name of the schema-only article in the merge publication.
typetinyintIndicates the type of schema-only article, which can be one of the following:

 0x20 = Stored procedure schema-only article.

 0x40 = View schema-only article or indexed view schema-only article.
objidintThe object identifier of the article base object. Can be the object identifier of a procedure, view, indexed, view, or user-defined function.
artiduniqueidentifierThe article ID.
descriptionnvarchar(255)The description of the article.
pre_creation_commandtinyintDefault action to take when the article is created in the subscription database:

 0 = None - if the table already exists at the Subscriber, no action is taken.

 1 = Drop - drops the table before re-creating it.

 2 = Delete -issues a delete based on the WHERE clause in the subset filter.

 3 = Truncate -same as 2, but deletes pages instead of rows. However, does not take a WHERE clause.
pubiduniqueidentifierThe unique identifier of the publication.
statustinyintIndicates the status of the schema-only article, which can be one of the following:

 1 = Unsynced - the initial processing script to publish the table runs the next time the Snapshot Agent runs.

 2 = Active - the initial processing script to publish the table has been run.

 5 = New_inactive - to be added.

 6 = New_active - to be added.
creation_scriptnvarchar(255)The path and name of an optional article schema pre-creation script used to create target table.
schema_optionbinary(8)The bitmap of the schema generation option for the given schema-only article, which can be the bitwise logical OR the result of one or more of these values:

 0x00 = Disable scripting by the Snapshot Agent and uses the provided CreationScript.

 0x01 = Generate the object creation (CREATE TABLE, CREATE PROCEDURE, and so on).

 0x10 = Generate a corresponding clustered index.

 0x20 = Convert user-defined data types to base data types.

 0x40 = Generate corresponding nonclustered index or indexes.

 0x80 = Include declared referential integrity on the primary keys.

 0x100 = Replicate user triggers on a table article, if defined.

 0x200 = Replicate foreign key constraints. If the referenced table is not part of a publication, all foreign key constraints on a published table are not replicated.

 0x400 = Replicate check constraints.

 0x800 = Replicate defaults.

 0x1000 = Replicate column-level collation.

 0x2000 = Replicate extended properties associated with the published article source object.

 0x4000 = Replicate unique keys if defined on a table article.

 0x8000 = Replicate a primary key and unique keys on a table article as constraints using ALTER TABLE statements.

For more information on possible values for schema_option, see sp_addmergearticle.
destination_objectsysnameThe name of the destination object in the subscription database. This value applies only to schema-only articles, such as stored procedures, views, and UDFs.
destination_ownersysnameThe owner of the object in the subscription database, if it is not dbo.

Replication Tables (Transact-SQL)
Replication Views (Transact-SQL)

Community Additions