User's Manual

sp_add_remote_table procedure
Purpose To mark a table for SQL Remote replication.
Syntax sp_add_remote_table table_name,
[ resolve_procedure, ]
[ old_row_name, ]
[ remote_row_name ]
Argument Description
table_name
The table to be marked for SQL Remote replication.
resolve_procedure
The name of a stored procedure that carries out
actions when a conflict occurs.
old_row_name
The name of a table holding the values in the table
when a conflict occurs.
remote_row_name
The name of a table holding the values at the remote
database when a conflict-causing UPDATE statement
was applied.
Authorization You must be a system administrator to execute this procedure.
See also “sp_modify_remote_table procedure” on page 400
“sp_remove_remote_table procedure” on page 430
“Managing conflicts” on page 165.
Description Each table in a database must be marked for replication by using
sp_add_remote_table before it can be included in any SQL Remote
publications. After executing sp_add_remote_table, you can add the table
to a publication using the “sp_add_article procedure” on page 381 and the
“sp_add_article_col procedure” on page 383.
The sp_add_remote_table procedure calls sp_setreplicate, which flags the
table for replication. This tells Adaptive Server Enterprise to put extended
information into the transaction log. This information includes the entire
before and after images of the row.
The first argument is the name of the table to be marked for replication.
The remaining three arguments are optional. They are object names required
only for custom conflict resolution. If you are implementing custom conflict
resolution, you must supply the names of two tables, and a stored procedure.
The sp_add_remote_table procedure does not check for the existence of the
conflict resolution arguments: you can create them either before or after
marking the table for replication.
384