For transactions against a table to be replicated, the primary table in the primary database must be marked for replication and replication must be enabled for that table.
To mark a table in the primary database
Log in to the Replication Agent administration port using the following command:
isql -Uusername -Ppassword -Sinst_name
where username is the Replication Agent administrative user login name, password is the corresponding password, and inst_name is the name of the Replication Agent instance you want to mark a primary table for.
Use the pdb_setreptable command to determine if the table you want to mark is already marked in the primary database.
pdb_setreptable pdb_table
where pdb_table is the name of the table in the primary database that you want to mark for replication.
If the pdb_setreptable command returns information that the specified table is marked and replication is enabled, you need not continue this procedure.
If the pdb_setreptable command returns information that the specified table is marked, but replication is disabled, skip step 3 and continue this procedure from step 4 to enable replication for the table.
If the pdb_setreptable command returns information that the specified table is not marked, continue this procedure to mark the table for replication.
Use the pdb_setreptable command to mark the table for replication.
The pdb_setreptable command allows you to mark the primary table to be replicated and specify the name to use for replication.
Use the following command to mark the table for replication using a replication definition with the same table name:
pdb_setreptable pdb_table, mark
where pdb_table is the name of the table in the primary database that you want to mark for replication.
Use the following command to mark the table for replication using a replication definition with a different table name:
pdb_setreptable pdb_table, rep_table, mark
where pdb_table is the name of the table in the primary database that you want to mark for replication and rep_table is the name of the table in the with all tables named rep_table clause in the replication definition for this table.
When marking a table for replication, you can specify that the table owner’s name is sent along with the table name in the LTL. To do this, use the owner keyword after the mark keyword, as shown in the following example:
pdb_setreptable pdb_table, mark, owner
where pdb_table is the name of the table in the primary database that you want to mark for replication.
If the pdb_dflt_object_repl parameter is set to true, the table marked for replication with the pdb_setreptable command is ready for replication after you invoke the pdb_setreptable command successfully, and you can skip step 4 in this procedure.
The pdb_dflt_object_repl parameter
is set to true by default.
If the pdb_dflt_object_repl parameter is set to false, you must enable replication for the table before replication can take place.
Use the pdb_setreptable command to enable replication for the marked table.
pdb_setreptable pdb_table, enable
where pdb_table is the name of the marked table in the primary database for which you want to enable replication.
After the table is marked and replication is enabled for the table, you can begin replicating transactions that affect data in that table.