Set the capture start point - aws_mainframe_modernization_service - connect_cdc_sqdata - Latest

Connect CDC (SQData) Change Data Capture

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Change Data Capture
Copyright
2024
First publish date
2000
Last updated
2024-11-25
Published on
2024-11-25T15:05:48.570404

Connect CDC (SQData) Change Data Capture was designed to be both robust and forgiving in that it takes a simple and conservative approach when deciding where in the log to start capturing data when first started or upon being restarted following either a scheduled interruption of the capture or an unplanned disruption in a production environment.

The first time the Db2/z Capture agent is started, it uses the "current" Db2 LSN/RBA as starting point by Default. Capture can also be started for the first time at a specific point-in-time by explicitly specifying the start LSN. The current LSN can be determined using the Db2 -DISPLAY LOG command and then selecting a starting LSN based on the Begin Time of a logged transaction. Other transactions that started before that LSN but not already been committed or that are subsequently rolled back are considered in-flight units-of-work and will be ignored along with all other transactions that committed prior to that LSN.

The starting Db2 LSN/RBA is specified in the capture .cab configuration file. The LSN can be set at a global capture agent level; all tables in the configuration file and all Subscribing Engines/Targets or for individual Subscriptions/Targets. An LSN of 0 indicates that capture should start from the current point in the Db2 log. This is used when starting the capture agent for the first time or in a test environment when skipping ahead to the current log point may be desirable.

Note: Once the global LSN is established, it would typically never be altered for normal production operation. If you reset the LSN, you may lose data.
The capture agent continuously updates the global LSN and the individual Subscription/Target LSNs in the configuration file as changed data is processed. Each time the capture agent starts, data capture is automatically resumed from the last LSN committed by the Subscribing Engines, which guarantees the re-capture of all in-flight transactions.

When adding a new table to an existing configuration file, that table will be captured from the current point in the Db2 log. In a test environment resetting the Global LSN to 0 will start the entire capture from the current point in time.

To delete CAB file
  1. Clear LSN for cab file in-case the logs has been rotated.
  2. Enter d next to the CAB File(s) you want to delete.


  3. Restart Agent in-case of IPL or crash or stuck.

Example

Set the LSN to 0 (zero means current time) at the capture agent level for all tables with the SQDCONF modify command.
//*----------------------------------------
//*- SET LSN AT GLOBAL LEVEL
//*----------------------------------------
//SETLSN EXEC PGM=SQDCONF
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SQDPARMS DD *
 modify /home/sqdata/db2cdc/db2cdc.cab --lsn=0
//*