Changing Db2 Warehouse configuration settings

You can change configuration settings after you deploy your instance by editing the Db2uCluster or Db2uInstance custom resource.

About this task

After you deploy, you can edit the Db2uCluster or Db2uInstance custom resource to change the following Db2 Warehouse configuration settings:
  • Database configuration parameters
  • Database manager configuration parameters
  • Db2 Warehouse registry and environment variables
Note: Modifying configuration settings can impact system behavior and stability.

Procedure

  1. Find the Db2uCluster or Db2uInstance custom resource that you want to configure and assign it to an environment variable.
    1. Retrieve a list of your Db2uCluster and Db2uInstance custom resources by navigating to Data > Databases > Database Details in the IBM® Software Hub web client, or by running the following command:
      oc get db2ucluster,db2uinstance -n ${PROJECT_CPD_INST_OPERANDS}
    2. Set the Db2uCluster or Db2uInstance custom resource name to the DB2_CR_ID environment variable:
      DB2_CR_ID=<db2ucluster_cr_name/db2uinstance_cr_name>
  2. Run the following command to edit the Db2uCluster or Db2uInstance custom resource:
    oc edit db2ucluster ${DB2_CR_ID} -n ${PROJECT_CPD_INST_OPERANDS}
    oc edit db2uinstance ${DB2_CR_ID} -n ${PROJECT_CPD_INST_OPERANDS}
  3. Change your configuration settings.
    Database configuration parameters
    To find your database configuration parameters, see the yaml path: spec.environment.database.dbConfig.

    Under the key dbConfig, you can add, edit, or delete a key-value pair. Values must be enclosed in quotation marks.

    For example, setting the parameter LOGPRIMARY to 50 for the database BLUDB would appear as follows:

    spec:
      environment:
        database:
         dbConfig:
            LOGPRIMARY: "50"
          name: BLUDB
    For more information on the parameters, see Database configuration parameters in the Db2 Warehouse documentation.
    Database manager configuration parameters
    To find your database manager configuration parameters, see the yaml path: spec.environment.instance.dbmConfig.

    Under the key dbmConfig, you can add, edit, or delete a key-value pair. Values must be enclosed in quotation marks. For example, setting the parameter DIAGSIZE to 50 would appear as follows:

    spec:
      environment:
        instance:
          dbmConfig:
            DIAGSIZE: "100"
    For more information on the parameters, see Database manager configuration parameters in Db2 Warehouse documentation.
    Registry and environment variables
    Registry configuration parameters are found under the yaml path: spec.environment.instance.registry.

    Under the key registry, you can add, edit, or delete a key-value pair. Values must be enclosed in quotation marks. For example, setting the parameter DB2_DISPATCHER_PEEKTIMEOUT to 5 would appear as follows:

    spec:
      environment:
        instance:
          registry:
            DB2_DISPATCHER_PEEKTIMEOUT: "5"

    For more information on the parameters, see Registry and environment variables in the Db2 Warehouse documentation.

  4. Exec into the Db2 engine pod as the db2inst1 user and use the following command to apply the updates:
    oc exec -it c-${DB2_CR_ID}-db2u-0 -- su - db2inst1 -c "/db2u/scripts/apply-db2cfg-settings.sh --setting all"

    For database configuration and database manager configuration parameters, refer to Configuring the Db2 database manager with configuration parameters documentation for details.

    For registry variables, refer to Setting instance-level variables in a partitioned database environment.