Exec into the Db2 Warehouse pod with catalog partition

Important: IBM Cloud Pak for Data Version 4.6 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.6 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.

To do some common administration tasks, you must be able to run the exec command on the Db2 Warehouse pod with catalog partition.

Before you begin

To be able to copy commands and run them on your system without modification, complete a one-time setup of a variety of installation environment variables. For example, the PROJECT_CPD_INSTANCE environment variable defines the namespace of your database deployment. For more information, see Setting up installation environment variables.

Procedure

  1. To find the respective db2ucluster resource name and create a db2ucluster environment variable, run the following commands:
    oc get db2ucluster --all-namespaces
    db2ucluster=db2ucluster_resource_name
  2. Find the name of your Db2 Warehouse pod for your database deployment:
    db2_podname=$(oc -n ${PROJECT_CPD_INSTANCE} get po --selector name=dashmpp-head-0 | grep ${db2ucluster} | awk {'print $1'})
  3. Run the exec command to exec into the Db2 Warehouse pod:
    oc -n ${PROJECT_CPD_INSTANCE} exec -it ${db2_podname} -- bash