Setting up the DB2 partition type for DataStage

To use the DB2 partition type, you must catalog the database and the connection. You also configure the Db2® node configuration file and the APT_CONFIG_FILE environment variable.

Procedure

  1. Catalog the database and catalog the connection. For instructions, see Configuring Db2 connections to work with database sequences in DataStage.
  2. View the db2nodes.cfg file on the remote node. By default, the file is at /home/db2inst1/sqllib/db2nodes.cfg.
    1. Make note of the hostname and partitions. For example:
      
      0 DB2_Server_Hostname 0

      For information about the contents of the db2nodes.cfg file, see Format of the Db2 node configuration file

  3. In Cloud Pak for Data, edit the db2nodes.cfg file on the persistent volume (PV) at /px-storage/db2/.
    1. Change the DB2_Server_Hostname to the compute node name.
    2. Update the partition information.
      For example, if there is one partition, use this configuration:
      0 ds-px-default-ibm-datastage-px-compute-0.ds-px-default-ibm-datastage-px-compute 0

      If there are two partitions, use this configuration:

      0 ds-px-default-ibm-datastage-px-compute-0.ds-px-default-ibm-datastage-px-compute 0
      1 ds-px-default-ibm-datastage-px-compute-1.ds-px-default-ibm-datastage-px-compute 1
      
    3. For Db2 non-root installations, check that the db2nodes.cfg symbolic link exists at /home/dsuser/sqllib/db2nodes.cfg.
  4. Update the APT_CONFIG environment variable.
    1. Ensure that the hostname in db2nodes.cfg file matches the node name in the APT_CONFIG_FILE environment variable.
    2. Set the values for the APT_CONFIG_FILE environment variable to match the partition count.
      The compute nodes that you specify in the APT_CONFIG_FILE environment variable must have same number as the partition count in the db2nodes.cfg file in /px-storage/db2/. For example, if the db2nodes.cfg file has one partition,
      0 ds-px-default-ibm-datastage-px-compute-0.ds-px-default-ibm-datastage-px-compute 0
      configure the APT_CONFIG_FILE environment variable for one compute node.