1. Manage a CDC Group

1.1. Add a CDC Group

Add a change data capture (CDC) using API_DBIADM.ADD_CDC_GROUP. Set the parameter ‘p_bdate_needed’ to true if the BDate should be a mandatory parameter for manual CDC triggers within this group.

Example

1EXECUTE SCRIPT API_DBIADM.ADD_CDC_GROUP(
2   'tst_cdc_grp'                  -- p_cdc_group
3   ,'Test CDC group for Person'   -- p_description
4   ,false                         -- p_bdate_needed
5);

By running the command above a new entry is added to the table DBI_CDC_GROUPS.

CDC_GROUP

DESCRIPTION

BDATE_NEEDED

tst_cdc_grp

Test CDC group for Person

false

1.2. Modify a CDC Group

Use API_DBIADM.MODIFY_CDC_GROUP for modificatins. Providing NULL leaves the parameters as is, while a blank (’ ‘) restores the default value. In the example below the description is changed.

Example

1EXECUTE SCRIPT API_DBIADM.MODIFY_CDC_GROUP(
2   'tst_cdc_grp'                  -- p_cdc_group
3   ,'Changed description'         -- p_description
4   ,null                          -- p_bdate_needed
5);

The change can be seen in the entry for the CDC group ‘tst_cdc_grp’ in the table DBI_CDC_GROUPS, as is shown below.

CDC_GROUP

DESCRIPTION

BDATE_NEEDED

tst_cdc_grp

Changed description

false

1.3. Remove a CDC Group

Remove a CDC group by executing API_DBIADM.REMOVE_CDC_GROUP. Additionally, a BDomain can be provided as well to remove the CDC group for one specific BDomain only. If BDomain is empty the CDC group is removed completely.

Example

1EXECUTE SCRIPT API_DBIADM.REMOVE_CDC_GROUP(
2   'tst_cdc_grp'                  -- p_cdc_group
3   ,''                            -- p_bdomain
4);

After the command above has been issued, the entry for the CDC group ‘tst_cdc_grp’ is deleted from the table DBI_CDC_GROUPS completely.