Migrating to SQL Replication Version 9.7 Fix Pack 2

This migration is optional if you are upgrading from Version 9.7. For Version 9.7 Fix Pack 2, a new control table was added to maintain a history of changes to range-partitioned source tables on Linux, UNIX, or Windows systems. The new control table, IBMQREP_PART_HIST, is required only if you are replicating from range-partitioned tables on these systems. Because of this, the optional migration is limited to the Capture server.

If you need to migrate, follow these steps:

  1. Install the fix pack.
  2. Find the migration script at samples/repl/mig97/sql/asncapluwv97fp.sql.
  3. Customize the migration script by replacing the schema of the control table. Follow the instruction in the script.
  4. Stop the Capture program if it is running;
  5. Optional: Stop the Replication Alert Monitor if it is running to avoid unnecessary alerts during migration.
  6. Run the migration script.

    You can also use the following DDL to create the new control table:

    CREATE TABLE capture_schema.IBMQREP_PART_HIST
    (
    LSN              VARCHAR(16)     FOR BIT DATA NOT NULL,
    HISTORY_TIME      TIMESTAMP                 NOT NULL,
    TABSCHEMA         VARCHAR(128)              NOT NULL,
    TABNAME           VARCHAR(128)              NOT NULL,
    DATAPARTITIONID   INTEGER                   NOT NULL,
    TBSPACEID         INTEGER                   NOT NULL,
    PARTITIONOBJECTID INTEGER                   NOT NULL,
    PRIMARY KEY (LSN, TABSCHEMA, TABNAME, DATAPARTITIONID,
    TBSPACEID, PARTITIONOBJECTID)
    );
  7. Start the Capture program with the migrate=y and startmode=WARMNS parameters.
    Recommendation: Start the Capture program as soon as possible after the migration, before you start other applications if possible. DB2 provides replication with the first valid log sequence number (LSN) within the current set of active log files as determined by the LOGPRIMARY database parameter. You should start Capture soon enough to ensure that all of the transactions that need to be captured can be found in the active log files.

No migration is required for Apply control servers or Monitor control servers for Version 9.7 Fix Pack 2.

Important: On Linux, UNIX, and Windows, after you migrate your DB2® instance to Version 9, any log files that were created by the Version 8 DB2 instance will be inaccessible to the Capture program. Any transactions that were not processed before migration will be lost. To avoid losing transactions, make sure to stop your DB2 applications and let the Capture program process any remaining transactions in the DB2 recovery log before you migrate the DB2 instance.