Changing the name of the default Db2 or Db2 Warehouse database

To change the name of your default Db2 or Db2 Warehouse database, complete the following steps.

Procedure

  1. Run the following command, substituting the new default database name for MYDB:
    oc patch db2ucluster -n <PROJECT> <DB2UCLUSTER-NAME> --type merge -p '{"spec":{"environment":{"database":{"name":"MYDB"}}}}'
  2. Verify that the corresponding db2uconfig configMap reflects the changed DBNAME value:
    oc get cm -n <PROJECT> -o yaml c-<DB2UCLUSTER-NAME>-db2uconfig | grep DBNAME
  3. Delete one or more corresponding Db2® engine pods to enable the configMap changes to take effect:
    oc delete pods -n <PROJECT> c-<DB2UCLUSTER-NAME>-db2u-0