Synchronizing IBM InfoSphere Change Data Capture configuration metadata

Adding a table mapping to replicate a new shadow table or updating an existing mapping changes the InfoSphere CDC configuration metadata which is stored on disk in the HADR primary server for an active CDC instance. To propagate these changes to all the standby servers, you must synchronize the configuration metadata.

Before you begin

  • Ensure that you can log in to the HADR primary server and all the standby servers as cdc-user.

About this task

Synchronizing InfoSphere CDC configuration metadata between active and passive CDC instances is required in the following cases:
  • If you change table mapping metadata in a subscription, such as by adding a shadow table or updating the structure of a shadow table, restore the latest version of the InfoSphere CDC configuration metadata to the passive CDC instance on the HADR standby server.
  • After a prolonged HADR standby failure event, restore the latest version of the InfoSphere CDC configuration metadata to the passive CDC instance on the HADR standby when the standby server is back online to ensure the passive CDC instance is up-to-date.
To ensure that CDC configuration metadata is kept in sync, you should configure a periodic CDC metadata backup-and-restore (from the primary HADR server to the HADR standby).

Procedure

To synchronize InfoSphere CDC configuration metadata:

  1. Log in to the HADR primary server as cdc-user.
  2. Back up the InfoSphere CDC configuration metadata by issuing the following command:
    dmbackupmd -I cdc-instance-name
    The backup directory is located under the cdc-installation-dir/instance/cdc-instance-name/conf/backup/ directory. Each backup attempt creates a folder name bX where X is the sequence number X. For example, if you run the dmbackupmd command two times, two directories called cdc-installation-dir/instance/cdc-instance-name/conf/backup/b1 and cdc-installation-dir/instance/cdc-instance-name/conf/backup/b2 are created for each backup. The b2 directory contains the most recent backup.
  3. Copy the backup of the InfoSphere CDC configuration metadata to all standby servers:
    1. Compress the most recent backup directory into a file.
      The following example shows how to use the tar command to create a compressed file:
      cd cdc-installation-dir/instance/cdc-instance-name/conf/backup/bX
      tar -cvf temp-directory/cdcdmbackupdir.tar *
      
      Where bX refers to the most recent backup directory.
    2. Copy the compressed file to all standby servers.
      The following example shows how to use the scp command to copy the compressed file:
      scp temp-directory/cdcdmbackupdir.tar
       cdc-user@hadr-standby-host:cdc-installation-dir/instance/cdc-instance-name/conf
  4. Optional: To keep a consistent log-history of the InfoSphere CDC instance, you should copy the events database:
    1. Compress the events database directory into a file.
      The following example shows how to use the tar command to create a compressed file:
      cd cdc-installation-dir/instance/cdc-instance-name/events
      tar -cvf temp-directory/cdceventsdbdir.tar *
      
    2. Copy the compressed file to all standby servers.
      The following example shows how to use the scp command to copy the compressed file:
      scp temp-directory/cdceventsdbdir.tar
       cdc-user@hadr-standby-host:cdc-installation-dir/instance/cdc-instance-name/events
  5. Copy the configuration metadata from the compressed backup file in each standby server:
    1. Log in to the standby server as cdc-user.
    2. Uncompress the backup file and copy the files in the configuration metadata directory:
      cd cdc-installation-dir/instance/cdc-instance-name/conf
      tar -xvf cdcdmbackupdir.tar
    3. Optional: Uncompress the events database file and copy the files in the events directory:
      cd cdc-installation-dir/instance/cdc-instance-name/events
      tar -xvf cdceventsdbdir.tar