Precise Instantiation Using Db2 for i Database Utilities

The following topics describe the steps to perform instantiation using the Db2 for i database utilities.

Precise Instantiation Using Db2 for i Database Utilities

For an initial load between two Db2 for i source and target systems, you can use the Db2 for i system utilities to establish the target data. To do this, you save the file(s) that you want to load to the target by using the SAVOBJ or SAVLIB commands, and then restore them on the target using the RSTOBJ or RSTLIB commands.

Another alternative is to use the Db2 for i commands CPYTOIMPF (Copy to Import File) and CPYFRMIMPF (Copy from Import File) to create files that can be used with the bulk load utilities of other databases. See the Db2 for i Information Center documentation for more details on Copying between different systems.

In both cases, no special configuration of any Oracle GoldenGate initial-load processes is needed. You use the change-synchronization Extract groups configured for the Db2 for i and start the change-synchronization Extract group to capture ongoing data changes while copying and loading it to a file. When the copy is finished, you start the change-synchronization Replicat group to re-synchronize rows that were changed while the copy was being applied. From that point forward, both Extract and Replicat continue running to maintain data synchronization.

To Perform Instantiation with a Database Utility

  1. Make certain that you have addressed the requirements in Prerequisites for Instantiating for Db2 for i.

  2. Connect to the deployment on source system and start the primary Extract or Extract groups to start change extraction.

    START EXTRACT primary Extract group name
  3. Start making the copy on the source system.

  4. Wait until the copy is finished and record the time of completion.

  5. View the Replicat parameter file to make certain that the HANDLECOLLISIONS parameter is listed. If not, edit the file and add the parameter to the file.

    EDIT PARAMS Replicat group name

    Note:

    Do not use the VIEW PARAMS or EDIT PARAMS command to view or edit an existing parameter file that is in a character set other than that of the local operating system (such as one where the CHARSET option was used to specify a different character set). View the parameter file from outside Admin Client if this is the case; otherwise, the contents may become corrupted.

  6. On the target system, start change replication.

    START REPLICAT Replicat group name
  7. On the target system, issue the following command to verify the status of change replication.

    INFO REPLICAT Replicat group name
  8. Continue to issue the INFO REPLICAT command until you have verified that change replication has posted all of the change data that was generated during the initial load. Reference the time of completion that you recorded. For example, if the copy stopped at 12:05, make sure change replication has posted data up to that point.

  9. On the target system, issue the following command to turn off the HANDLECOLLISIONS parameter and disable the initial-load error handling.

    SEND REPLICAT Replicat group name, NOHANDLECOLLISIONS
  10. On the target system, edit the Replicat parameter file to remove the HANDLECOLLISIONS parameter. This prevents HANDLECOLLISIONS from being enabled again the next time Replicat starts.

    Caution:

    Do not use the VIEW PARAMS or EDIT PARAMS command to view or edit an existing parameter file that is in a character set other than that of the local operating system (such as one where the CHARSET option was used to specify a different character set). View the parameter file from outside Admin Client if this is the case; otherwise, the contents may become corrupted.

  11. Save and close the parameter file.

    From this point forward, Oracle GoldenGate continues to synchronize data changes.