sp_addtabletocontents (T-SQL)

Inserts references into the merge tracking tables for any rows in a source table that are not currently included in the tracking tables.

Syntax

sp_addtabletocontents [@table_name =] 'table_name'
    [,[@owner_name =] 'owner_name']

Arguments
[@table_name =] 'table_name'
Is the name of the table. table_name is sysname, with no default.
[@owner_name =] 'owner_name'
Is the name of the owner of the table. owner_name is sysname, with a default of NULL.
Return Code Values

0 (success) or 1 (failure)

Remarks

sp_addtabletocontents is used only in merge replication.

The rows in the table_name are referred to by their rowguidcol and the references are added to the merge tracking tables. sp_addtabletocontents should be used after bulk copying data into a table that is published using merge replication. The stored procedure initiates tracking of the rows that were copied and ensures that the new rows will be included in the next synchronization.

Permissions

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

See Also
Adding Rows Using Bulk Copy Operations System Stored Procedures

  


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