Marking a table for replication

Use the same procedure to mark tables for replication with either a log-based Replication Agent or a trigger-based Replication Agent.

StepsTo mark a table in the primary database for replication

  1. Log in to the Replication Agent administration port.

  2. Use the pdb_setreptable command to determine if the table 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, you need not continue this procedure.

    If the pdb_setreptable command returns information that the specified table is not marked, continue this procedure to mark the table for replication.

  3. 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 a different table name to use in the replicate database (as specified in a replication definition).

    If the value of the pdb_dflt_object_repl parameter is true, you can skip step 4 in this procedure.

    NoteThe default value of the pdb_dflt_object_repl parameter is true.

    If the value of the pdb_dflt_object_repl parameter is false, you must enable replication for the table before replication can take place.

  4. 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 replication is enabled for the table, you can begin replicating transactions that affect data in that table.