Table of Contents

Search

  1. Preface
  2. Part 1: PowerExchange Change Data Capture Introduction
  3. Part 2: CDC Components Configuration and Management
  4. Part 3: CDC Sources Configuration and Management
  5. Part 4: Change Data Extraction
  6. Part 5: Monitoring and Tuning
  7. Appendix A: CDC for z/OS Troubleshooting
  8. Appendix B: DTL__CAPXTIMESTAMP Time Stamps

Migrating from a DB2 Data Sharing Environment

Migrating from a DB2 Data Sharing Environment

If you need to migrate a DB2 environment from data sharing to non-data-sharing mode during DB2 CDC, complete this procedure.
Before migrating to non-data-sharing mode, wait until the DB2 ECCR processes all of the change records that were produced in data sharing mode. Otherwise, change data might be lost, which can cause data inconsistencies and require target table rematerialization.
  1. Verify that the DB2 ECCR successfully captured all of the log records for source table changes that were written in data sharing mode.
  2. Configure read-only (RO) access for the database and each table space. Use the following commands:
    For a database:
    START DATABASE(
    database_name
    ) ACCESS(RO)
    For a table space:
    START DATABASE (
    database_name
    ) SPACENAM(
    table_space_name
    ) ACCESS(RO)
  3. To verify that the DB2 ECCR processed all of the log records that were written prior to setting RO access on the table spaces, issue the following command:
    MODIFY
    job_name
    ,DISPLAY
    This command returns the DB2 log timestamp for when the last-read log record was created. This timestamp must be later than the recorded time at which the last table space with source tables was set to RO access.
  4. Stop the DB2 ECCR by issuing the following command:
    STOP
    job_name
  5. After you complete the migration from the DB2 data sharing environment, start the DB2 subsystem in non-data-sharing mode. Then start the DB2 ECCR on one of the following ways:
    • Cold start the ECCR. Then set read-write (RW) access on the table spaces that contain the source tables and allow updates on the source tables again. PowerExchange begins capturing changes that are written in non-data-sharing mode to the source tables.
    • Special start the DB2 ECCR before doing any DDL operations on the source tables. You can perform the special start before or after allowing updates on the source tables again.
  6. For the special start, determine the STARTLOC keyword value in the START statement in the REPL2OPT DD data set:
    • Run the DB2 DSNJU004 utility.
    • From the DSNJU004 print output, get the MIN RBA FOR TORBA value.
    • Use the MIN RBA FOR TORBA value as the STARTLOC value.
    • If you specified the group attachment name in the CN statement of the REPL2OPT DD data set, or use the RN statement value by default, specify a DB2 subsystem ID.
After you migrate to a DB2 non-data-sharing environment, DB2 does not support read operations on the log records that were written in data sharing mode.
If you run multiple ECCRs and registered all resources under the group attachment name, you can continue to use the same repository and the same RN value as before. For each registered table that is not in the DB2 catalog, the following message is issued:
PWXEDM177371W Table '
creator
.
table_name
' does not exist in DB2 catalog
This warning message does not affect change capture for tables that are defined in the DB2 catalog for the DB2 subsystem under which the ECCR is running.

0 COMMENTS

We’d like to hear from you!