sp_articlecolumn (T-SQL)

Specifies columns used in an article. Use sp_articlecolumn to vertically filter the data in a table.

Syntax

sp_articlecolumn [@publication =] 'publication', [@article =] 'article'
    [,[@column =] 'column'] [,[@operation =] 'operation']
    [,[@refresh_synctran_procs =] refresh_synctran_procs]
    [,[@ignore_distributor =] ignore_distirbutor]

Arguments
[@publication =] 'publication'
Is the name of the publication that contains this article. publication is sysname, with no default.
[@article =] 'article'
Is the name of the article. article is sysname, with no default.
[@column =] 'column'
Is the name of the column to be added or dropped. column is sysname, with a default of NULL. If NULL, all columns are published.
[@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.
[@refresh_synctran_procs =] refresh_synctran_procs
Is whether to add or drop columns in an article. refresh_synctran_procs is bit, with a default of 1. If 1, the stored procedures supporting synchronous transactions are regenerated to match the number of columns replicated.
[@ignore_distributor =] ignore_distirbutor
Indicates whether this stored procedures executes without connecting to the Distributor. ignore_distributor is bit, with a default of 0. If 0, the database must be enabled for publishing, and the article cache should be refreshed to reflect the new columns replicated by the article. If 1, allows article columns to be dropped for articles that reside in an unpublished database, and should be used only in recovery situations.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_articlecolumn sets a bit in sysarticles. Only an unsubscribed article can be filtered using sp_articlecolumn.

If the publication allows immediate-updating subscriptions, the article must contain a timestamp column. If you attempt to delete the timestamp column, sp_articlecolumn returns an error.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_articlecolumn.

See Also
sp_addarticle sp_droppublication
sp_addpublication sp_enumfullsubscribers
sp_articleview sp_helparticle
sp_changearticle sp_helparticlecolumns
sp_changepublication sp_helppublication
sp_droparticle System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.