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

Determining the Journal Receiver Needed for Restart Processing

Determining the Journal Receiver Needed for Restart Processing

You can determine the journal receiver that is required for restarting a CDC session by examining the restart token values. The restart token portion of the token pair includes the journal entry sequence number.
To restart CDC sessions at the proper location in the journal receiver chain, PowerExchange records information about the last journal entry that the session successfully processed in restart tokens. PowerExchange and PWXPC display the restart token values in messages such as PWX-04565, PWX-09959, PWXPC_10081, PWXPC_10082, PWXPC_12102, PWXPC_12103, and PWXPC_12128. Also, PWXPC writes the starting and ending restart tokens for a CDC session to files in the restart token file directory that is specified for the PWX CDC application connection.
The restart tokens consist of a pair of token values, each being an alphanumeric string:
  • The first token value is called the
    sequence token
    . The sequence token has a length of either 72 or 80 characters, depending on whether it is displayed by PowerExchange or PWXPC. This token indicates the location of the last change record that the CDC session successfully processed.
  • The second token is called the
    restart token
    . The restart token has a length of 52 characters. This token indicates the location in the change stream from which PowerExchange starts reading change data when you restart a CDC session.
When you restart a CDC session, PowerExchange uses the journal entry sequence number that is recorded in the restart token value to start reading journal entries from the journal receivers again. After PowerExchange reaches the journal entry sequence number that is recorded in the sequence token, PowerExchange begins passing change records to the CDC session.
In the restart token, the journal entry sequence number is a hexadecimal value in positions 31 through 50. For example, the termination restart token file for a CDC session contains the following information:
<!-- Restart Tokens for the Table: as4rr001_AS4_RRTB_SRC_001 --> d3kjm850as.as4rr001_AS4_RRTB_SRC_001=513172FF043AA000000000000000000838F2513172FF043AA000000000000000000838F200000000 d3kjm850as.as4rr001_AS4_RRTB_SRC_001=D2D1D4F8F5F0C1E2513172FF043AA000000000000000000838F0 <!-- Restart Tokens for the Table: as4rr002_AS4_RRTB_SRC_002 --> d3kjm850as.as4rr002_AS4_RRTB_SRC_002=513172FF043AA000000000000000000838F2513172FF043AA000000000000000000838F200000000 d3kjm850as.as4rr002_AS4_RRTB_SRC_002=D2D1D4F8F5F0C1E2513172FF043AA000000000000000000838F0 <!-- Restart Tokens for the Table: as4rr003_AS4_RRTB_SRC_003 --> d3kjm850as.as4rr003_AS4_RRTB_SRC_003=513172FF043AA000000000000000000838F2513172FF043AA000000000000000000838F200000000 d3kjm850as.as4rr003_AS4_RRTB_SRC_003=D2D1D4F8F5F0C1E2513172FF043AA000000000000000000838F0
In this file, the restart token for each source has the following value:
Column Position ----0----1----1----2----2----3----3----4----4----5----5 ----5----0----5----0----5----0----5----0----5----0----5 D2D1D4F8F5F0C1E2513172FF043AA000000000000000000838F0
In this example restart token, the journal entry sequence number is 00000000000000000838. After converting 838 from hexadecimal to decimal, the journal entry sequence number that PowerExchange uses to start reading change data is 2104.
Do not try to create a restart token from a journal entry sequence number. If you do so, the restart token will not be valid.
To determine the journal receiver that PowerExchange will use for restarting the CDC session, use the i5/OS DSPJRNRCVA command. This command displays information for journal receivers. The command output includes the beginning and ending journal entry sequence numbers for a journal receiver, in the
First sequence number
and
Last sequence number
fields. To find the journal receiver that contains the journal entry sequence value from the restart token, you might need to display many of the journal receivers from the journal receiver chain.

0 COMMENTS

We’d like to hear from you!