Point-in-time recovery - 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

There may be times when a point-in-time recovery is required, where changes made from a few hours or even days earlier must be or recaptured, perhaps because an Engine script was modified. The appropriate LSN <value> can be determined by using the Db2 -DISPLAY LOG command and/or running the Db2 Log Print Utility DSNJ004. The first thing to determine is if there is more than one Engine subscribed to the capture and if there is, whether recaptured changes should be published to one all of the subscribed Engines.

  1. Regardless of how many Engines are subscribed or will require re-capture and re-publishing, the Global LSN must be set to the the appropriate value as follows:
    //*----------------------------------------
    //*- SET LSN AT GLOBAL LEVEL
    //*----------------------------------------
    //SETLSN EXEC PGM=SQDCONF
    //SYSPRINT DD SYSOUT=*
    //SYSOUT DD SYSOUT=*
    //SQDPARMS DD *
     modify /home/sqdata/db2cdc/db2cdc.cab --lsn=<lsn_value>
  2. Determine if changes will be re-captured and re-published to one or more subscribing Engines. For every Engine that requires re-capture a separate SQDCONF Job step must be run that specifies both the target datastore (subscribing Engine) and the remine LSN.
    //*----------------------------------------
    //*- SET LSN FOR ONE SPECIFIC Engine
    //*----------------------------------------
    //SETLSN1 EXEC PGM=SQDCONF
    //SYSPRINT DD SYSOUT=*
    //SYSOUT DD SYSOUT=*
    //SQDPARMS DD *
     modify /home/sqdata/db2cdc/db2cdc.cab --target=cdc:///DB2TODB2 --lsn=<lsn_value>
  3. After the modifications are complete the Capture must be restarted with an additional --safe-restart=<value> parameter specifying the starting LSN for the re-capture.
    //SQDDB2C EXEC PGM=SQDDB2C,REGION=0M
    //*SQDDB2C EXEC PGM=XQDDB2C,REGION=0M
    //SQDPUBL DD DSN=SQDATA.NACL.PUBLIC,DISP=SHR
    //SQDPKEY DD DSN=SQDATA.NACL.PRIVATE,DISP=SHR
    //SYSPRINT DD SYSOUT=*
    //SYSOUT DD SYSOUT=*
    //CEEDUMP DD SYSOUT=*
    //SQDLOG DD SYSOUT=*
    //*SQDLOG8 DD DUMMY
    //*SQDPARMS DD DISP=SHR,DSN=SQDATA.V400.PARMLIB(DB2CDC)
    //SQDPARMS DD *
    --apply --start --safe-restart=<lsn_value>
    /home/sqdata/db2cdc/db2cdc.cab 
    //*
Note: If the capture was running while the SQDCONF modify Job steps were executed, the Capture must be Stopped before the changes can be Applied to the Capture configuration file.