SQL Remote User's Guide
Command Reference for Adaptive Server Enterprise
To mark a table for SQL Remote replication.
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. |
You must be a system administrator to execute this procedure.
sp_modify_remote_table procedure
sp_remove_remote_table procedure
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 and the sp_add_article_col procedure.
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.
The two tables must have the same columns and data types as table table_name.
The following statement marks the Customer table for replication, using default conflict resolution:
exec sp_add_remote_table Customer
The following statement marks the Customer table for replication, using a stored procedure named Customer_Conflict to resolve conflicts. The old and remote rows are stored in tables named old_Customer and remote_Customer, respectively:
exec sp_add_remote_table Customer, Customer_Conflict, old_Customer, remote_Customer