Handle an IBM i file reorganization - connect_cdc_mimix_share - 5.8

Connect CDC System Reference Guide

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (MIMIX Share)
Version
5.8
Language
English
Product name
Connect CDC
Title
Connect CDC System Reference Guide
Copyright
2024
First publish date
2003
ft:lastEdition
2024-02-12
ft:lastPublication
2024-02-12T15:11:59.486869

Reorganizing an IBM i file changes the physical positions of all the records in the file, which can change the relative record number of each record. This is likely to invalidate the mapping of the source and target table key values if the RRN column is used as the distribution key. Consequently, whenever such a reorganization occurs, you must resynchronize the source and target tables.

To preserve the integrity of your distributed data, Connect CDC automatically detects a file reorganization through the source table journal, and stops capturing data so you can resynchronize the tables. The DB2/400 Change Selector issues a message and shuts down if it sees an F/RG record, which is written to the journal receiver when a file reorganize command (RGZPFM) completes.

The following procedure is recommended to coordinate your file reorganization and table resynchronization with Connect CDC processing:

  1. Start the file reorganization.

  2. Let the DB2/400 Change Selector detect the reorganize command in the journal and shut itself down.

  3. Let Connect CDC Kernel continue running to flush all data from the metabase queue tables.

  4. Stop Connect CDC Kernel when the queue tables are empty.

  5. If the source and target tables are protected, delete all rows from their shadow tables.

  6. Start a request in the monitoring and control tool of your choice to resynchronize the source and target tables.

  7. Start the Change Selector.

  8. When the data copy completes, open the source table to user updates, and start replication.