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
- Catalog the database and catalog the connection. For instructions, see Configuring Db2 connections to work with database sequences in DataStage.
- View the db2nodes.cfg file on the remote node. By default, the file
is at /home/db2inst1/sqllib/db2nodes.cfg.
- 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
- Make note of the hostname and partitions. For example:
- In Cloud Pak for Data, edit the
db2nodes.cfg file on the persistent volume (PV) at
/px-storage/db2/.
- Change the DB2_Server_Hostname to the compute node name.
- 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
- For Db2 non-root installations, check that the db2nodes.cfg symbolic link exists at /home/dsuser/sqllib/db2nodes.cfg.
- Update the APT_CONFIG environment variable.
- Ensure that the hostname in db2nodes.cfg file matches the node name in the APT_CONFIG_FILE environment variable.
- 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,
configure the APT_CONFIG_FILE environment variable for one compute node.0 ds-px-default-ibm-datastage-px-compute-0.ds-px-default-ibm-datastage-px-compute 0