Table of Contents

Search

  1. Preface
  2. Change Data Capture Introduction
  3. PowerExchange Listener
  4. PowerExchange Condense
  5. DB2 for i5/OS Change Data Capture
  6. Remote Logging of Data
  7. Introduction to Change Data Extraction
  8. Extracting Change Data
  9. Monitoring CDC Sessions
  10. Managing Change Data Extractions
  11. Tuning CDC Sessions
  12. Appendix A: DTL__CAPXTIMESTAMP Time Stamps

CDC Guide for i5/OS

CDC Guide for i5/OS

Example 1. Creating Current Restart Tokens with Special Override Statements

Example 1. Creating Current Restart Tokens with Special Override Statements

This example adds a source table, RRTB_SRC_004, to a CDC session that has three other sources. You edit the restart token file to generate restart tokens that represent the current end of the change stream for the additional source.
In the restart token file, you define special override statements with CURRENT_RESTART option for the RRTB_SRC_004 source.
For the other three sources, you retain the existing restart points.
To add a source with CURRENT_RESTART restart tokens:
  1. In Workflow Monitor, use the Stop command to stop the workflow.
  2. After the workflow stops, select the Recover Task command to run a recovery session.
    PWXPC writes the following messages in the session log:
    PWXPC_12060 [INFO] [CDCRestart] =============================== Session restart information: =============================== Extraction Map Name Restart Token 1 Restart Token 2 Source d1dsn9.rrtb0002_RRTB_SRC_002 000000AD220F00000000000000AD220F0000000000000000 C1E4E2D34040000000AD0D9C00000000 GMD storage d1dsn9.rrtb0001_RRTB_SRC_001 000000AD220F00000000000000AD220F0000000000000000 C1E4E2D34040000000AD0D9C00000000 GMD storage d1dsn9.rrtb0003_RRTB_SRC_003 000000AD220F00000000000000AD220F0000000000000000 C1E4E2D34040000000AD0D9C00000000 GMD storage
    PWXPC also writes the restart tokens in the restart token file that is identified the CDC application connection attributes.
  3. Edit the mapping, session, and workflow to add the source RRTB_SRC_004.
  4. Edit the restart token file to add RESTART1 and RESTART2 special override statements that specify the CURRENT_RESTART option for the RRTB_SRC_004 source.
    The updated file appears as follows:
    <!-- existing sources d1dsn9.rrtb0001_RRTB_SRC_001=000000AD220F00000000000000AD220F0000000000000000 d1dsn9.rrtb0001_RRTB_SRC_001=C1E4E2D34040000000AD0D9C00000000 d1dsn9.rrtb0002_RRTB_SRC_002=000000AD220F00000000000000AD220F0000000000000000 d1dsn9.rrtb0002_RRTB_SRC_002=C1E4E2D34040000000AD0D9C00000000 d1dsn9.rrtb0003_RRTB_SRC_003=000000AD220F00000000000000AD220F0000000000000000 d1dsn9.rrtb0003_RRTB_SRC_003=C1E4E2D34040000000AD0D9C00000000 <!-- new source RESTART1=CURRENT_RESTART RESTART2=CURRENT_RESTART
  5. Cold start the session.
    PWXPC connects to PowerExchange and generates restart tokens that match the current end of the change stream for the RRTB_SRC_004 source. PWXPC passes the generated restart tokens to PowerExchange to begin change data extraction. Because the restart points for the other sources are earlier than the restart point for RRTB_SRC_004, PWXPC does not pass any change data for RRTB_SRC_004 until it reads the first change after the generated restart point.

0 COMMENTS

We’d like to hear from you!