Zero Downtime Installation Guide for IBM DB2

Zero Downtime Installation Guide for IBM DB2

Edit and Run Scripts for IBM DB2 Database

Edit and Run Scripts for IBM DB2 Database

Multidomain MDM
ships with two sets of scripts for IBM DB2. One set for the source database, and one set for the target database.
After you run each script, check for errors. If you see errors, navigate to the
GGS
directory and open the
ggserr.log
. You can try starting processes manually from the
Oracle GoldenGate Command Interpreter for DB2
window by typing
start *
.
  1. On the source system, navigate to the following directory:
    <MDM installation directory>/database/db2/zdt/samples/SOURCE
  2. Open each of the following files in the SOURCE directory, edit the example values to match your source system values, and save the files.

      2_CONFIGURE_EVENT_QUEUE.db2

      3_START_EVENT_QUEUE.db2

      4_CONFIGURE_EXTRACT.db2

      5_CONFIGURE_SEQUENCES.db2

      6_START_EXTRACT.db2

  3. Navigate to the following directory:
    <MDM installation directory>/database/db2/zdt/samples/TARGET
  4. Open each of the following files in the TARGET directory, edit the example values to match your target system values, and save the files.

      2_CONFIGURE_EVENT_QUEUE.db2

      3_START_EVENT_QUEUE.db2

      4_CONFIGURE_REPLICAT.db2

      5_CONFIGURE_SEQUENCES.db2

      6_START_REPLICAT.db2

  5. Run scripts to configure the event queue.
    1. From the SOURCE directory, run:
      .../SOURCE > db2 -tvf 2_CONFIGURE_EVENT_QUEUE.db2
    2. From the TARGET directory, run:
      .../TARGET > db2 -tvf 2_CONFIGURE_EVENT_QUEUE.db2
    If you open the
    Oracle GoldenGate Command Interpreter for DB2
    window and type
    info all
    , you can see that the scripts configure two EXTRACT processes and one REPLICAT process. The processes are stopped.
  6. Run scripts to start the event queue.
    1. From the SOURCE directory, run:
      .../SOURCE > db2 -tvf 3_START_EVENT_QUEUE.db2
    2. From the TARGET directory, run:
      .../TARGET > db2 -tvf 3_START_EVENT_QUEUE.db2
    3. On the source system, in the
      Oracle GoldenGate Command Interpreter for DB2
      window, type
      info all
      .
      The two EXTRACT processes and the REPLICAT process are running.
    4. On the target system, in the
      Oracle GoldenGate Command Interpreter for DB2
      window, type
      info all
      .
      The two EXTRACT processes and the REPLICAT process are running.
    5. To verify that the event queue is working, open the
      C:/TEMP/cmx_debug_SRCDB.log
      file on the source system and the
      C:/TEMP/cmx_debug_TGTDB.log
      file on the target system. In the
      Oracle GoldenGate Command Interpreter for DB2
      window, type
      stop rqesnva
      . Verify that the last line in both debug logs records the event:
      Message type "STOPPED" received from "rqenva"
      . Restart the process.
  7. Run scripts to configure the EXTRACT and REPLICAT processes. The first script creates a file that is called
    mdm_sample.def
    on the source system. The second script copies the
    mdm_sample.def
    file to the target system.
    1. From the SOURCE directory, run:
      .../SOURCE > db2 -tvf 4_CONFIGURE_EXTRACT.db2
      The script might take some time to complete. The script updates all the tables in the Operational Reference Store schema that participate in replications.
      You can watch the progress of the script by opening the
      C:/TEMP/cmx_debug_SRCDB.log
      file. You can see a record of the updated table definitions by opening the
      c:/GSS/dirprm/mdm_sample.def
      file on the source system.
    2. From the TARGET directory, run:
      .../TARGET > db2 -tvf 4_CONFIGURE_REPLICAT.db2
      The script copies the
      mdm_sample.def
      file from the source system to the target system
      c:/GSS/dirprm
      directory. The changes are applied to the target database.
  8. Run scripts to configure sequences. Sequencing distinguishes between rows inserted in the source database versus rows inserted in the target database.
    1. From the SOURCE directory, run:
      .../SOURCE > db2 -tvf 5_CONFIGURE_SEQUENCES.db2
      When rows are inserted into the source database, an odd number is added to the sequence number.
    2. From the TARGET directory, run:
      .../TARGET > db2 -tvf 5_CONFIGURE_SEQUENCES.db2
      When rows are inserted into the target database, an even number is added to the sequence number.
  9. Run scripts to start the EXTRACT and REPLICAT processes.
    1. From the SOURCE directory, run:
      .../SOURCE > db2 -tvf 6_START_EXTRACT.db2
    2. From the TARGET directory, run:
      .../TARGET > db2 -tvf 6_START_REPLICAT.db2
  10. The configuration is complete. To verify that the processes are running, in the
    Oracle GoldenGate Command Interpreter for DB2
    window on both systems, type
    info all
    . In a successful configuration, all processes are in the running state.

0 COMMENTS

We’d like to hear from you!