Configuring IBM Db2 Warehouse

After deployment of the Db2 Warehouse image, you can change the values of some configuration options.

About this task

The following options can be set only during deployment, not afterward:
DB_CODESET
DB_COLLATION_SEQUENCE
DB_PAGE_SIZE
DB_TERRITORY
ENABLE_ORACLE_COMPATIBILITY
TABLE_ORG
RUNTIME_ENV

Procedure

  1. If necessary, list the configuration options and their values by issuing the show_options command:
    [root@localhost - Db2wh /]# show_options
    +-----------------------------+----------+------------+
    | Option                      | Value    | Customized |
    +-----------------------------+----------+------------+
    | DB_TERRITORY                | US       | No         |
    | TABLE_ORG                   | COLUMN   | No         |
    | DB_COLLATION_SEQUENCE       | IDENTITY | No         |
    | DB_CODESET                  | UTF-8    | No         |
    | ENABLE_ORACLE_COMPATIBILITY | YES      | Yes        |
    | DB_PAGE_SIZE                | 32768    | No         |
    | DISABLE_SPARK               | NO       | No         |
    | GUARDIUM_INFO               |          | No         |
    | TIMEZONE                    | UTC      | No         |
    | RUNTIME_ENV                 | CLOUD    | Yes        |
    +-----------------------------+----------+------------+
    The list indicates, for each option, whether that option was customized (that is, set explicitly by an administrator). For an option that was not customized, the indicated value is the default value.
  2. Stop the Db2 Warehouse services by issuing the following command. For an MPP deployment, issue the command on the head node.
    docker exec -it Db2wh stop
  3. On each node, stop the container by issuing the following command:
    docker stop Db2wh
  4. On each node, remove the container by issuing the following command:
    docker rm Db2wh
  5. Log in to Docker by using your API key:
    echo <apikey> | docker login -u iamapikey --password-stdin icr.io
    where <apikey> is the API key that you created as a prerequisite in Getting container images.
  6. On each node, issue the following command:
    docker run -d -it --privileged=true --net=host --name=Db2wh -e configuration_option=value -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 <tag>
    where:
    • configuration_option=value represents a configuration option and its new value. The configuration options are described in Configuration options.
    • <tag> represents one of the following values.
      • For IBM POWER® LE hardware:
        icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-ppcle
      • For IBM z Systems® hardware:
        icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-s390x
      • For Db2 Warehouse Enterprise Edition running on x86 hardware:
        icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-linux

Example

The following example illustrates how to change the setting of the DISABLE_SPARK option for Db2 Warehouse Enterprise Edition running on x86 hardware:
docker run -d -it --privileged=true --net=host --name=Db2wh -e DISABLE_SPARK=YES -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-linux