- [ @publication= ] 'publication'
Is the name of the publication that contains the article. publication is sysname, with no default.
- [ @article= ] 'article'
Is the name of the article. The name must be unique within the publication. article is sysname, with no default. article must be on the local computer running Microsoft SQL Server, and must conform to the rules for identifiers.
- [ @source_object= ] 'source_object'
Is the database object to be published. source_object is sysname, with no default. For more information about the types of objects that can be published using merge replication, see Publishing Data and Database Objects.
- [ @type= ] 'type'
Is the type of article. type is sysname, with a default of table, and can be one of the following values.
Table with schema and data. Replication monitors the table to determine data to be replicated.
func schema only
Function with schema only.
indexed viewschema only
Indexed view with schema only.
proc schema only
Stored procedure with schema only.
synonym schema only
Synonym with schema only.
view schema only
View with schema only.
- [ @description= ] 'description'
Is a description of the article. description is nvarchar(255), with a default of NULL.
- [ @column_tracking= ] 'column_tracking'
Is the setting for column-level tracking. column_tracking is nvarchar(10), with a default of FALSE. trueturns on column tracking. false turns off column tracking and leaves conflict detection at the row level. If the table is already published in other merge publications, you must use the same column tracking value used by existing articles based on this table. This parameter is specific to table articles only.
If row tracking is used for conflict detection (the default), the base table can include a maximum of 1,024 columns, but columns must be filtered from the article so that a maximum of 246 columns is published. If column tracking is used, the base table can include a maximum of 246 columns. For more information about the tracking level, see the "Tracking Level" section of How Merge Replication Detects and Resolves Conflicts.
- [ @status= ] 'status'
Is the status of the article. status is nvarchar(10), with a default of unsynced. If active, the initial processing script to publish the table is run. If unsynced, the initial processing script to publish the table is run at the next time the Snapshot Agent runs.
- [ @pre_creation_cmd= ] 'pre_creation_cmd'
Specifies what the system is to do if the table exists at the subscriber when applying the snapshot. pre_creation_cmd is nvarchar(10), and can be one of the following values.
If the table already exists at the Subscriber, no action is taken.
Issues a delete based on the WHERE clause in the subset filter.
Drops the table before re-creating it. Required to support Microsoft SQL Server Compact 3.5 SP1 Subscribers.
Truncates the destination table.
- [ @creation_script= ] 'creation_script'
Is the path and name of an optional article schema script used to create the article in the subscription database. creation_script is nvarchar(255), with a default of NULL.
Creation scripts are not run on SQL Server Compact 3.5 SP1 Subscribers.
- [ @schema_option= ] schema_option
Is a bitmap of the schema generation option for the given article. schema_option is binary(8), and can be the | (Bitwise OR) product of one or more of these values.
Disables scripting by the Snapshot Agent and uses the provided schema precreation script defined in creation_script.
Generates the object creation (CREATE TABLE, CREATE PROCEDURE, and so on). This is the default value for stored procedure articles.
Generates a corresponding clustered index. Even if this option is not set, indexes related to primary keys and UNIQUE constraints are generated if they are already defined on a published table.
Converts user-defined data types (UDT) to base data types at the Subscriber. This option cannot be used when there is a CHECK or DEFAULT constraint on a UDT column, if a UDT column is part of the primary key, or if a computed column references a UDT column.
Generates corresponding nonclustered indexes. Even if this option is not set, indexes related to primary keys and UNIQUE constraints are generated if they are already defined on a published table.
Replicates PRIMARY KEY constraints. Any indexes related to the constraint are also replicated, even if options 0x10 and 0x40 are not enabled.
Replicates user triggers on a table article, if defined.
Replicates FOREIGN KEY constraints. If the referenced table is not part of a publication, all FOREIGN KEY constraints on a published table are not replicated.
Replicates CHECK constraints.
Replicates column-level collation.
Replicates extended properties associated with the published article source object.
Replicates UNIQUE constraints. Any indexes related to the constraint are also replicated, even if options 0x10 and 0x40 are not enabled.
This option is not valid for Publishers running SQL Server 2005 or later versions.
Replicates CHECK constraints as NOT FOR REPLICATION so that the constraints are not enforced during synchronization.
Replicates FOREIGN KEY constraints as NOT FOR REPLICATION so that the constraints are not enforced during synchronization.
Replicates filegroups associated with a partitioned table or index.
Replicates the partition scheme for a partitioned table.
Replicates the partition scheme for a partitioned index.
Replicates table statistics.
Replicates default Bindings.
Replicates rule Bindings.
Replicates the full-text index.
XML schema collections bound to xml columns are not replicated.
Replicates indexes on xml columns.
Creates any schemas not already present on the subscriber.
Converts xml columns to ntext on the Subscriber.
Converts large object data types (nvarchar(max), varchar(max), and varbinary(max)) introduced in SQL Server 2005 to data types that are supported on SQL Server 2000. For information about how these types are mapped, see the "Mapping New Data Types for Earlier Versions" section in Using Multiple Versions of SQL Server in a Replication Topology.
Attempts to drop dependencies to any objects that are not part of the publication.
Use this option to replicate the FILESTREAM attribute if it is specified on varbinary(max) columns. Do not specify this option if you are replicating tables to SQL Server 2005 Subscribers. Replicating tables that have FILESTREAM columns to SQL Server 2000 Subscribers is not supported, regardless of how this schema option is set. See related option 0x800000000.
Converts date and time data types (date, time, datetimeoffset, and datetime2) introduced in SQL Server 2008 to data types that are supported on earlier versions of SQL Server. For information about how these types are mapped, see the "Mapping New Data Types for Earlier Versions" section in Using Multiple Versions of SQL Server in a Replication Topology.
Replicates the compression option for data and indexes. For more information, see Creating Compressed Tables and Indexes.
Set this option to store FILESTREAM data on its own filegroup at the Subscriber. If this option is not set, FILESTREAM data is stored on the default filegroup. Replication does not create filegroups; therefore, if you set this option, you must create the filegroup before you apply the snapshot at the Subscriber. For more information about how to create objects before you apply the snapshot, see Executing Scripts Before and After the Snapshot Is Applied.
See related option 0x100000000.
Converts common language runtime (CLR) user-defined types (UDTs) to varbinary(max) so that columns of type UDT can be replicated to Subscribers that are running SQL Server 2005.
Converts the hierarchyid data type to varbinary(max) so that columns of type hierarchyid can be replicated to Subscribers that are running SQL Server 2005. For more information about how to use hierarchyid columns in replicated tables, see hierarchyid (Transact-SQL).
Replicates any filtered indexes on the table. For more information about filtered indexes, see Filtered Index Design Guidelines.
Converts the geography and geometry data types to varbinary(max) so that columns of these types can be replicated to Subscribers that are running SQL Server 2005.
Replicates indexes on columns of type geography and geometry.
If this value is NULL, the system auto-generates a valid schema option for the article. The Default Schema Option table in the Remarks section shows the value that is chosen based upon the article type. Also, not all schema_option values are valid for every type of replication and article type. The Valid Schema Option table given in the Remarks shows the options that can be specified for a given article type.
The schema_option parameter only affects replication options for the initial snapshot. Once the initial schema has been generated by the Snapshot Agent and applied at the Subscriber, the replication of publication schema changes to the Subscriber occur based on schema change replication rules and the replicate_ddl parameter setting specified in sp_addmergepublication. For more information, see Making Schema Changes on Publication Databases.
- [ @subset_filterclause= ] 'subset_filterclause'
Is a WHERE clause specifying the horizontal filtering of a table article without the word WHERE included. subset_filterclause is of nvarchar(1000), with a default of an empty string.
For performance reasons, we recommended that you not apply functions to column names in parameterized row filter clauses, such as LEFT([MyColumn]) = SUSER_SNAME(). If you use HOST_NAME in a filter clause and override the HOST_NAME value, you might have to convert data types by using CONVERT. For more information about best practices for this case, see the section "Overriding the HOST_NAME() Value" in Parameterized Row Filters.
- [ @article_resolver= ] 'article_resolver'
Is the COM-based resolver used to resolve conflicts on the table article or the .NET Framework assembly invoked to execute custom business logic on the table article. article_resolver is varchar(255), with a default of NULL. Available values for this parameter are listed in Microsoft Custom Resolvers. If the value provided is not one of the Microsoft resolvers, SQL Server uses the specified resolver instead of the system-supplied resolver. Use sp_enumcustomresolvers to enumerate the list of available custom resolvers. For more information, see Executing Business Logic During Merge Synchronization and Advanced Merge Replication Conflict Detection and Resolution.
- [ @resolver_info= ] 'resolver_info'
Is used to specify additional information required by a custom resolver. Some of the Microsoft Resolvers require a column provided as input to the resolver. resolver_info is nvarchar(255), with a default of NULL. For more information, see Microsoft COM-Based Resolvers.
- [ @source_owner= ] 'source_owner'
Is the name of the owner of the source_object. source_owner is sysname, with a default of NULL. If NULL, the current user is assumed to be the owner.
- [ @destination_owner= ] 'destination_owner'
Is the owner of the object in the subscription database, if not 'dbo'. destination_owner is sysname, with a default of NULL. If NULL, 'dbo' is assumed to be the owner.
- [ @vertical_partition= ] 'column_filter'
Enables and disables column filtering on a table article. vertical_partition is nvarchar(5) with a default of FALSE.
false indicates there is no vertical filtering and publishes all columns.
true clears all columns except the declared primary key and ROWGUID columns. Columns are added by using sp_mergearticlecolumn.
- [ @auto_identity_range= ] 'automatic_identity_range'
Enables and disables automatic identity range handling for this table article on a publication at the time it is created. auto_identity_range is nvarchar(5), with a default of FALSE. true enables automatic identity range handling, while false disables it.
auto_identity_range has been deprecated and is provided for backward compatibility only. You should use identityrangemanagementoption for specifying identity range management options. For more information, see Replicating Identity Columns.
- [ @pub_identity_range= ] pub_identity_range
Controls the identity range size allocated to a Subscriber with a server subscription when automatic identity range management is used. This identity range is reserved for a republishing Subscriber to allocate to its own Subscribers. pub_identity_range is bigint, with a default of NULL. You must specify this parameter if identityrangemanagementoption is auto or if auto_identity_range is true.
- [ @identity_range= ] identity_range
Controls the identity range size allocated both to the Publisher and to the Subscriber when automatic identity range management is used. identity_range is bigint, with a default of NULL. You must specify this parameter if identityrangemanagementoption is auto or if auto_identity_range is true.
identity_range controls the identity range size at republishing Subscribers using previous versions of SQL Server.
- [ @threshold= ] threshold
Percentage value that 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. threshold is int, with a default of NULL. You must specify this parameter if identityrangemanagementoption is auto or if auto_identity_range is true.
- [ @verify_resolver_signature= ] verify_resolver_signature
Specifies if a digital signature is verified before using a resolver in merge replication. verify_resolver_signature is int, with a default of 1.
0 specifies that the signature will not be verified.
1 specifies that the signature will be verified to see if it is from a trusted source.
- [ @destination_object= ] 'destination_object'
Is the name of the object in the subscription database. destination_object is sysname, with a default value of what is in @source_object. This parameter can be specified only if the article is a schema-only article, such as stored procedures, views, and UDFs. If the article specified is a table article, the value in @source_object overrides the value in destination_object.
- [ @allow_interactive_resolver= ] 'allow_interactive_resolver'
Enables or disables the use of the Interactive Resolver on an article. allow_interactive_resolver is nvarchar(5), with a default of FALSE. true enables the use of the Interactive Resolver on the article; false disables it.
Interactive Resolver is not supported by SQL Server Compact 3.5 SP1 Subscribers.
- [ @fast_multicol_updateproc= ] 'fast_multicol_updateproc'
This parameter has been deprecated and is maintained for backward compatibility of scripts.
- [ @check_permissions= ] check_permissions
Is a bitmap of the table-level permissions that are verified when the Merge Agent applies changes to the Publisher. If the Publisher login/user account used by the merge process does not have the correct table permissions, the invalid changes are logged as conflicts. check_permissions is int, and can be the | (Bitwise OR) product of one or more of the following values.
Permissions are not checked.
Checks permissions at the Publisher before insert operations made at a Subscriber can be uploaded.
Checks permissions at the Publisher before update operations made at a Subscriber can be uploaded.
Checks permissions at the Publisher before delete operations made at a Subscriber can be uploaded.
- [ @force_invalidate_snapshot= ] force_invalidate_snapshot
Acknowledges that the action taken by this stored procedure may invalidate an existing snapshot. force_invalidate_snapshot is a bit, with a default of 0.
0 specifies that adding an article does not cause the snapshot to be invalid. If the stored procedure detects that the change does require a new snapshot, an error occurs and no changes are made.
1 specifies that adding an article may cause the snapshot to be invalid, and if there are existing subscriptions that require a new snapshot, gives permission for the existing snapshot to be marked as obsolete and a new snapshot generated. force_invalidate_snapshot is set to 1 when adding an article to a publication with an existing snapshot.
- [ @published_in_tran_pub= ] 'published_in_tran_pub'
Indicates that an article in a merge publication is also published in a transactional publication. published_in_tran_pub is nvarchar(5), with a default of FALSE. true specifies that the article is also published in a transactional publication.
- [ @force_reinit_subscription= ] force_reinit_subscription
Acknowledges that the action taken by this stored procedure may require existing subscriptions to be reinitialized. force_reinit_subscription is a bit, with a default of 0.
0 specifies that adding an article does not cause the subscription to be reinitialized. If the stored procedure detects that the change would require existing subscriptions to be reinitialized, an error occurs and no changes are made.
1 means that changes to the merge article causes existing subscriptions to be reinitialized, and gives permission for the subscription reinitialization to occur. force_reinit_subscription is set to 1 when subset_filterclause specifies a parameterized row filter.
- [ @logical_record_level_conflict_detection= ] 'logical_record_level_conflict_detection'
Specifies the level of conflict detection for an article that is a member of a logical record. logical_record_level_conflict_detection is nvarchar(5), with a default of FALSE.
true specifies that a conflict will be detected if changes are made anywhere in the logical record.
false specifies that the default conflict detection is used as specified by column_tracking. For more information, see Grouping Changes to Related Rows with Logical Records.
Because logical records are not supported by SQL Server Compact 3.5 SP1 Subscribers, you must specify a value of false for logical_record_level_conflict_detection to support these Subscribers.
- [ @logical_record_level_conflict_resolution= ] 'logical_record_level_conflict_resolution'
Specifies the level of conflict resolution for an article that is a member of a logical record. logical_record_level_conflict_resolution is nvarchar(5), with a default of FALSE.
true specifies that the entire winning logical record overwrites the losing logical record.
false specifies that winning rows are not constrained to the logical record. If logical_record_level_conflict_detection is true, then logical_record_level_conflict_resolution must also be set to true. For more information, see Grouping Changes to Related Rows with Logical Records.
Because logical records are not supported by SQL Server Compact 3.5 SP1 Subscribers, you must specify a value of false for logical_record_level_conflict_resolution to support these Subscribers.
- [ @partition_options= ] partition_options
Defines 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 is tinyint, and can be one of the following values.
The filtering for the article either is static or does not yield a unique subset of data for each partition, that is, an "overlapping" partition.
The partitions are overlapping, and data manipulation language (DML) updates made at the Subscriber cannot change the partition to which a row belongs.
The filtering for the article yields non-overlapping partitions, but multiple Subscribers can receive the same partition.
The filtering for the article yields non-overlapping partitions that are unique for each subscription.
If the source table for an article is already published in another publication, then the value of partition_options must be the same for both articles.
- [ @processing_order= ] processing_order
Indicates the processing order of articles in a merge publication. processing_order is int, with a default of 0. 0 specifies that the article is unordered, and any other value represents the ordinal value of the processing order for this article. Articles are processed in order from lowest to highest value. If two articles have the same value, processing order is determined by the order of the article nickname in the sysmergearticles system table. For more information, see Specifying the Processing Order of Merge Articles.
- [ @subscriber_upload_options= ] subscriber_upload_options
Defines restrictions on updates made at a Subscriber with a client subscription. For more information, see Optimizing Merge Replication Performance with Download-Only Articles. subscriber_upload_options is tinyint, and can be one of the following values.
No restrictions. Changes made at the Subscriber are uploaded to the Publisher.
Changes are allowed at the Subscriber, but they are not uploaded to the Publisher.
Changes are not allowed at the Subscriber.
If the source table for an article is already published in another publication, the value of subscriber_upload_options must be the same for both articles.
- [ @identityrangemanagementoption= ] identityrangemanagementoption
Specifies how identity range management is handled for the article. identityrangemanagementoption is nvarchar(10), and can be one of the following values.
Disables identity range management.
Marks the identity column using NOT FOR REPLICATION to enable manual identity range handling.
Specifies automatic management of identity ranges.
Defaults to nonewhen the value of auto_identity_range is not true.
For backward compatibility, when the value of identityrangemanagementoption is NULL, the value of auto_identity_range is checked. However, when the value of identityrangemanagementoption is not NULL, then the value of auto_identity_range is ignored. For more information, see Replicating Identity Columns.
- [ @delete_tracking= ] 'delete_tracking'
Indicates whether deletes are replicated. delete_tracking is nvarchar(5), with a default of TRUE. false indicates that deletes are not replicated, and true indicates that deletes are replicated, which is the usual behavior for merge replication. When delete_tracking is set to false, rows deleted at the Subscriber must be manually removed at the Publisher, and rows deleted at the Publisher must be manually removed at the Subscriber.
Setting delete_tracking to false results in non-convergence. If the source table for an article is already published in another publication, then the value of delete_tracking must be the same for both articles.
delete_tracking options cannot be set using the New Publication Wizard or the Publication Properties dialog box.
- [ @compensate_for_errors= ] 'compensate_for_errors'
Indicates if compensating actions are taken when errors are encountered during synchronization. compensate_for_errors is nvarchar(5), with a default of FALSE. When set to true, changes that cannot be applied at a Subscriber or Publisher during synchronization always lead to compensating actions to undo the change; however, one incorrectly configured Subscriber that generates an error can cause changes at other Subscribers and Publishers to be undone. false disables these compensating actions, however, the errors are still logged as with compensation and subsequent merges continues to attempt to apply the changes until successful.
For pull subscriptions at Subscribers running MicrosoftSQL Server 2000 version 8.00.858 and earlier (which includes SP3), compensating actions still occur even with compensate_for_errors set to false.
Although data in the affected rows might appear to be out of convergence, as soon as you address any errors, changes can be applied and data will converge. If the source table for an article is already published in another publication, then the value of compensate_for_errors must be the same for both articles.
- [ @stream_blob_columns= ] 'stream_blob_columns'
Specifies that a data stream optimization be used when replicating binary large object columns. stream_blob_columns is nvarchar(5), with a default of FALSE. true means that the optimization will be attempted.
Enabling this memory optimization may reduce the performance of the Merge Agent during synchronization. This option should only be used when replicating columns that contain megabytes of data.
Certain merge replication functionalities, such as logical records, can still prevent the stream optimization from being used when replicating binary large objects even with stream_blob_columns set to true.