To change the name of your default Db2 or Db2 Warehouse database, complete the following
steps.
Procedure
- 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"}}}}'
- Verify that the corresponding db2uconfig configMap reflects the changed
DBNAME
value:
oc get cm -n <PROJECT> -o yaml c-<DB2UCLUSTER-NAME>-db2uconfig | grep DBNAME
- 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