In addition to controlling which tables are captured, it is also possible to add and remove items to be excluded from capture based on other parameters including: User, Program, Transaction, Correlation ID, Plan, etc. The basic syntax varies slightly based on the current state of the configuration and can be can be specified one or more times per command line.
Syntax
Create state:
--exclude-<item>=<variable>
Modify state:
--auto-exclude-plan=NO | --add-excluded-<item>=<variable> | --remove-excluded-<item>=<variable>
Where item <variable> can be any one of the following list of optional keywords:
Item | Variable | Description |
user | User ID | The user-id associated with the transaction or program making Db2 data changes. |
correlation-id | Correlation ID | The Correlation ID of the program / transaction making Db2 data changes. |
plan | Plan Name | If non-blank, this is the Plan making Db2 data changes. |
Note: The wild-card character "*" can be used as part of the variable associated with any of the exclusion keywords, for example -correlation-id=db2tran*.
Example
Disable the automatic exclusion of the Connect CDC (SQData) Default plan (SQDV4000) to enable capture of updates that are normally excluded to prevent cyclic updates in an Active/Active Replication configuration.
//*-----------------------------------------------
//*- ADD USER EXCLUSION TO CONFIG FILE
//*-----------------------------------------------
//ADDEXCL EXEC PGM=SQDCONF
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SQDPARMS DD *
modify /home/sqdata/db2cdc/db2cdc.cab
--auto-exclude-plan=NO
Note: As with all modifications made to a Capture configuration file, the following steps must be followed to implement the change:
- Capture should be paused to allow subscribed Engines to consume all previously captured data.
- The Capture must then be Stopped.
- The changes must be Applied to the capture .CAB file to have the capture agent recognize the updated configuration.
- The Capture must be Started.