sp_mergearticlecolumn
Partitions a merge publication vertically. This stored procedure is executed at the Publisher on the publication database.
Syntax
sp_mergearticlecolumn [ @publication = ] 'publication'
, [ @article = ] 'article'
[ , [ @column = ] 'column'
[ , [ @operation = ] 'operation'
[ , [ @schema_replication = ] 'schema_replication' ]
[ , [ @force_invalidate_snapshot = ] force_invalidate_snapshot ]
[ , [ @force_reinit_subscription = ] force_reinit_subscription ]
Arguments
[@publication =] 'publication'
Is the name of the publication. Publication is sysname, with no default.
[@article =] 'article'
Is the name of the article in the publication. article is sysname, with no default.
[@column =] 'column'
Identifies the columns on which to create the vertical partition. column is sysname, with a default of NULL. If NULL, all columns in a table referenced by the article are replicated by default.
[@operation =] 'operation'
Is the replication status. operation is nvarchar(4), with a default of ADD. add marks the column for replication. drop unmarks the column.
[@schema_replication=] 'schema_replication'
Specifies that a schema change will be propagated when the Distribution Agent or Merge Agent runs. schema_replication is nvarchar(5), with a default of FALSE. If false, a schema change will not be propagated.
[@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 of 0. 0 specifies that changes to the merge article will not cause the snapshot to be invalid. 1 specifies 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.
[@force_reinit_subscription = ] force_reinit_subscription
Enables or disables the ability to have the subscription reinitializated. force_reinit_subscription is a bit with a default of 0. 0 specifies that changes to the merge article will not cause the subscription to be reinitialized. 1 specifies that changes to the merge article may cause the subscription to be reinitialized, and if that is the case, a value of 1 gives permission for the subscription reinitialization to occur.
Return Code Values
0 (success) or 1 (failure)
Remarks
sp_mergearticlecolumn is used in merge replication.
If an application sets a new vertical partition after the initial snapshot is created, a new snapshot must be generated and reapplied to each subscription. Snapshots are applied when the next scheduled snapshot and distribution or merge agent run.
Permissions
Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_mergearticlecolumn.
See Also
How to filter publications vertically using the Create Publication Wizard (Enterprise Manager)