CDC for DB2/AS400

Tools

Description

The CDC for DB2/400 tool is used to enable Change Data Capture (CDC) on source DB2/400 tables.

It offers the possibility to enable trigger based CDC or native mode CDC on source tables.

Refer to Getting started with DB2/400 databases for more information.

Properties

Property Mandatory Description

Historize All Data

false

When this option is selected, the CDC table is loaded with all the data corresponding to the modifed lines.

When the option is not selected, only the primary key or alternative key columns of the changed lines are loaded into the CDC table. When used in a mapping, the data is recreated by joining the source table to the CDC table.

Cdc Operation

false

Defines the operation that the tool should perform. Possible options are:

  • ADD_SUBSCRIBER: Allows registering a new subscriber for a table for which CDC was already enabled.

  • RECREATE: Allows dropping and recreating CDC tables, triggers, views with the existing subscribers. This can be useful when the source table definition has changed and the CDC objects have to be recreated with a new definition.

  • REMOVE_SUBSCRIBER: Allows removing a specific subscriber for a specific table.

  • START: Starts CDC on the selected table. A CDC table containing the modifications as well as some views are created in the work schema that allow using the data from this table with Semarchy templates.

  • STOP: Stops CDC for the selected table. The CDC table and views are dropped and all the subscribers are deleted from the technical table containing subscribers.

  • STOP ALL: Works as STOP but the technical table containing subscribers is also dropped. Should be performed as a last step to disable CDC completely when CDC is only enabled on one last table.

Subscriber

false

Name of the subscriber to be created/deleted.

The same name should be used on the mappings/processes that are supposed to consume the changed data from the CDC table.

With Key

false

Defines the key that should be used to join the source table when the Historize All Data property is not set. Possible options are:

  • PK: Primary key columns of the modified lines are loaded in the CDC table and then used for the join with the source table.

  • AK: Alternative key columns of the modified lines are loaded in the CDC table and then used for the join with the source table.

Capture Method

false

Defines the capture methods to use. Possible options are:

  • Trigger: Creates a trigger on the source table that propagates the changed data into the CDC table.

  • Native: Uses the DISPLAY_JOURNAL function to extract the changed data from journals. The changed data has to be extracted by read journal data tool.

Boundary Calculation Method

sequence-based

Defines the methods used to calculate the boundaries when retrieving journal data. The possible options are:

  • sequence-based: Method used by the template to calculate the boundaries based on sequences. Sequences provide a reliable and efficient approach to calculate boundaries, most notably when DB2 is configured with a journal cache. This is the default and recommended method.

  • timestamp-based: Method used by the template to calculate the boundaries based on timestamps. This method can, in some situations, provide better performances. However, it should NOT be used when DB2 is configured with a journal cache, because the records in the cache cannot be handled with this method.