Marking and unmarking tables

Individual tables to be replicated must be marked. You can mark tables explicitly using the pdb_setreptable command or automatically during pdb_xlog init processing when the pdb_automark_tables configuration parameter is set to true.

NoteThe pdb_automark_tables configuration parameter is not supported for UDB.

To replicate transactions that affect the data in a table in the primary database, that table must be marked for replication, and replication must be enabled for the marked table.

Marking a table can be separate from enabling replication for that table. If the value of the pdb_dflt_object_repl parameter is true, replication is enabled automatically at the time a table is marked. See “Enabling and disabling replication for marked tables”.

Table marking with Replication Agent for UDB

When a table is marked for replication with the Replication Agent for UDB (DB2), the Replication Agent does the following:

If you need to change the schema of a marked table, you must:

  1. Lock the table so that new operations cannot change any data in the table.

  2. Wait for the Replication Agent to complete its processing of any logged transactions in the table.

  3. Quiesce the Replication Agent instance.

  4. Change the table schema without changing the DATA CAPTURE option.

  5. Unlock the table to allow normal user or client access.

  6. Use the Replication Agent resume command to restart replication.

NoteIf you change the schema of a primary table, you may need to rematerialize the replicate table.

Table unmarking with Replication Agent for UDB

When you unmark a table marked for replication with the log-based Replication Agent for UDB, the Replication Agent does the following:

When a table is unmarked, any subsequent operations that affect the data in that table are ignored (not replicated).

NoteIn the event that the Replication Agent for UDB must re-scan the transaction log (such as when recovering from a replication error), transactions recorded prior to unmarking a table are not replicated.

Table marking with Replication Agent for Oracle

When a table is marked for replication with the log-based Replication Agent for Oracle, the Replication Agent does the following:

When a table is marked, any subsequent operations that affect the data in that table are replicated.

Table marking and unmarking with Replication Agent for Microsoft SQL Server

When a table is marked for replication with the log-based Replication Agent for Microsoft SQL Server, Replication Agent logs in to the primary database and executes commands to turn on logging of changes in the Microsoft SQL Server transaction log.

When a table marked for replication is unmarked with the log-based Replication Agent for Microsoft SQL Server, Replication Agent logs in to the primary database and executes commands to turn off logging of changes in the Microsoft SQL Server transaction log.