Configuring the JDBC properties to the target database

You can configure the JDBC properties (Common IBM Data Server Driver for JDBC and SQLJ properties) to the target database for Db2® Data Management Console on Cloud Pak for Data.

Procedure

  1. Run the following command to get the database instance ID:
    oc get pods -n ${PROJECT_CPD_INST_OPERANDS} | grep db2oltp

    Replace NAMESPACE with the namespace where your database instance is running on the cluster. The command returns a string that contains the instance ID number:

    c-db2oltp-1642733616603720-db2u-0

    In this example, the instance ID of the database is 1642733616603720.

  2. Edit the configmap for the database instance ID.
    oc edit cm ${database_instance_id} -n ${PROJECT_CPD_INST_OPERANDS} 
  3. Go to data > profile and modify the value of the profile. Search for the JDBC property. If the JDBC property exists, modify the original value to a new one. If the JDBC property does not exist, append the property and its value to the end. For example, to set the property of connectionTImeout, append the property as provided below:
    data:
      ...
      profile: '{"DB_IDENTITY_HASH":"-1753949238","URL":"jdbc:db2://c-db2wh-1642733616603720-db2u-engn-svc:50001/BLUDB","_PROFILE_INIT_":"true","dataServerExternalType":"DASHDBAN","dataServerType":"DB2LUW","databaseName":"BLUDB","databaseVersion":"11.5.0","databaseVersion_VRMF":"11.5.7.0","dbUUID":"c9c3568b-b251-48bb-9547-102790801fa0","host":"c-db2wh-1642733616603720-db2u-engn-svc","isInstPartitionable":"false","lastUpdatedTimeStamp":"1643170058201","name":"db2wh-1642733616603720","namespace":"","plan":"smp","port":"50001","sslCertLocation":"/opt/ibm-datasrvrmgr/Config/cpd-internal-tls/ca.crt","sslConnection":"true","timeZone":"0","timeZoneDiff":"0","connectionTimeout":"60"}'
      profileName: db2wh-1642733616603720
      ...
        
  4. Save the changes to configmap.
  5. Restart the Db2 Data Management Console pods.