Changing the replication method of a table
Your subscription can contain table mappings that have a combination of replication methods: Mirror or Refresh. You can change the replication method of one or more of your table mappings within a subscription. Before you can change the replication method, if you are mirroring the source table to the target, then you need to end replication on the subscription.
Procedure
- Ensure that you have ended any active replication on the subscription.
- Click Configuration > Subscriptions.
- Select the subscription that contains the mapped source and target tables.
- Select the table mapping in the Table Mappings view.
- Right-click and click Change Replication Method.
- Select one of the following options:
- Mirror (Change Data Capture)
- Immediately replicates changes made to the source table to the target table or accumulate source table changes and replicate at a later time. If your configuration requires you to prevent recursive updates when mirroring, enable the Prevent Recursion check box.
- Refresh (Snapshot)
- Replicates a snapshot of the source table to the target table.
- Note: If you are replicating your source table using the CDC Replication Engine for Oracle databases (Trigger edition) and decide to change the replication method from Mirror to Refresh, then CDC Replication disassociates the journal table from the source table. This was the journal table you had selected in the Map Tables wizard. After CDC Replication completes the refresh operation on the subscription, if you want CDC Replication to continue mirroring changes from this source table using the same journal table, then you must change the replication method back to Mirror and select the same journal table you were using before.
- Prevent Recursion
- Prevents CDC Replication from replicating changes back to the source database when you have configured a subscription for bidirectional replication. This is only available in versions of CDC Replication that support both source and target databases. Contact IBM® Support to implement bidirectional replication in your environment.
- Use Relative Record Number
- Enables CDC Replication to replicate updates to the target using a relative record number. When this option is checked, CDC Replication sends the Relative Record Number to the target and expects the Relative Record Number to be the identifying column on the target side. This means that the target tables cannot be updated by more than one source table (a target table cannot be a warehouse for multiple source tables). If you do not check this box, then the CDC Replication Engine for Db2® for i uses a unique key to replicate to the target.
- Notes:
- When this option is checked, if the source table is reorganized, the CDC Replication Engine for Event Server will automatically start a refresh for that table.
- If no Relative Record Number is available on the target table (for example, if the table resides on a non-IBM i system), you can still make use of this option by mapping the Relative Record Number on the source table to a column in the target table to. For more information, see Source RRN (&CNTRRN).
- This option is only available when using an he CDC Replication Engine for Db2 for i source.