Changing Db2 or Db2 Warehouse Configuration Settings
Db2 or Db2 Warehouse configuration settings can be permanently changed after deployment by editing the Db2uInstance custom resource.
- Database configuration parameters (db cfg)
- Database manager configuration parameters (dbm cfg)
- Registry and environment variables (db2set)
Procedure
- Determine the DB2U_IDENTIFIER to use that matches your Db2 deployment. The identifier
matches the name of the custom resource (CR) that is used to deploy Db2. Run the following command
to retrieve the name of the CR:
kubectl get db2uinstance -n NAMESPACE
- Edit the custom resource. This will open the custom resource definition in your default editor:
kubectl edit db2uinstance DB2UINSTANCE -n NAMESPACE
Database configuration parameters
Database configuration parameters are found under the yaml path
spec.environment.databases.dbConfig
. Each database has a list under the key
databases with its own unique name.
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 look like so:
spec:
environment:
databases:
- dbConfig:
LOGPRIMARY: "50"
name: BLUDB
For more information on the parameters, see Database configuration parameters in the Db2 documentation.
Database manager configuration parameters
Database manager configuration parameters are found under 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 look like so:
spec:
environment:
instance:
dbmConfig:
DIAGSIZE: "100"
For more information on the parameters, see Database manager configuration parameters in Db2 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 look like so:
spec:
environment:
instance:
registry:
DB2_DISPATCHER_PEEKTIMEOUT: "5"
For more information on the parameters, see Registry and environment variables in Db2 or Db2 Warehouse documentation.