UPDATE DATABASE CONFIGURATION command using the ADMIN_CMD procedure

The UPDATE DATABASE CONFIGURATION command modifies individual entries in a specific database configuration file. A database configuration file resides on every database partition on which the database has been created.

Scope

This command updates all database partitions or members by default, except when the following optional clause is specified:
  • MEMBER to update only one database member for a Db2® pureScale® environment, or to update only one database partition in a partitioned database environment.

Authorization

One of the following authorities:
  • SYSADM
  • SYSCTRL
  • SYSMAINT

Required connection

Database. The database connection must be local to the instance containing the connected database.

Command syntax

Read syntax diagramSkip visual syntax diagramUPDATEDATABASEDBCONFIGURATIONCONFIGCFGFORdatabase-aliasMEMBERmember-numberUSING config-keywordvaluevalueAUTOMATICAUTOMATICMANUAL IMMEDIATEDEFERRED

Command parameters

FOR database-alias
Specifies the alias of the database whose configuration is to be updated. Specifying the database alias is not required when a database connection has already been established. The database alias must be defined locally on the server. You can update the configuration file for another database residing under the same database instance. For example, if you are connected only to database db11, and issue update db config for alias db22 using .... immediate:
  • If there is no active connection on db22, the update will be successful because only the configuration file needs to be updated. A new connection (which will activate the database) will see the new change in memory.
  • If there are active connections on db22 from other applications, the update will work on disk but not in memory. You will receive a warning saying that the database needs to be restarted.
MEMBER member-number
The MEMBER clause specifies to which member the change should be applied. Omission of this clause results in the change being applied to all the members.
USING config-keyword value
config-keyword specifies the database configuration parameter to be updated. value specifies the value to be assigned to the parameter.
AUTOMATIC
Some configuration parameters can be set to AUTOMATIC, allowing Db2 database systems to automatically adjust these parameters to reflect the current resource requirements. For a list of configuration parameters that support the AUTOMATIC keyword, refer to the configuration parameters summary. If a value is specified along with the AUTOMATIC keyword, it might influence the automatic calculations. For specific details about this behavior, refer to the documentation for the configuration parameter.
Note: The appl_memory, logindexbuild, max_log and num_log_span database configuration parameters can only be set to AUTOMATIC using the command line processor.
MANUAL
Disables automatic tuning for the configuration parameter. The parameter is set to its current internal value and is no longer updated automatically.
IMMEDIATE
Make the changes immediately, while the database is running. IMMEDIATE is the default action. Since the ADMIN_CMD procedure requires a database connection, the changes will be effective immediately for any dynamically configurable parameters for the connected database.

This is a default clause when operating in the CLPPlus interface as well. IMMEDIATE need not be called when using CLPPlus processor.

DEFERRED
Make the changes only in the configuration file, so that the changes take effect the next time you reactivate the database.

Example

Set the database configuration parameter sortheap to a value of 1000 on the database partition to which the application is currently connected to.
CALL SYSPROC.ADMIN_CMD ('UPDATE DB CFG USING sortheap 1000')

Usage notes

Command execution status is returned in the SQLCA resulting from the CALL statement.

The database-alias must be an alias name that is defined on the server.

The command affects all database partitions unless MEMBER is specified.

To view or print a list of the database configuration parameters, use the SYSIBMADM.DBCFG administration view.

To reset all the database configuration parameters to the recommended defaults, use the RESET DATABASE CONFIGURATION command using the ADMIN_CMD procedure.

To change a database configuration parameter, use the UPDATE DATABASE CONFIGURATION command through the ADMIN_CMD procedure. For example, to change the logging mode to archival logging on a single-partition database environment containing a database called ZELLMART, use:

CALL SYSPROC.ADMIN_CMD ('update db cfg for zellmart using logarchmeth1 logretain')

To check that the logarchmeth1 configuration parameter has changed, use:

SELECT * FROM SYSIBMADM.DBCFG WHERE NAME='logarchmeth1'
To update a database configuration parameter on a specific database partition, you can:
  1. set the DB2NODE variable to a database partition number.
  2. connect to the database partition.
  3. update the database configuration parameters using UPDATE DATABASE CONFIGURATION command through the ADMIN_CMD procedure.
  4. disconnect from the database partition.
or you can use MEMBER. For example, to update the logging mode to only one specific partition (30) using MEMBER, use:
CALL SYSPROC.ADMIN_CMD ('update db cfg for zellmart member 30 using
 logarchmeth1 logretain')

For more information about Db2 database configuration parameters and the values available for each type of database node, see the individual configuration parameter descriptions. The values of these parameters differ for each type of database node configured (server, client, or server with remote clients).

Not all parameters can be updated.

Some changes to the database configuration file become effective only after they are loaded into memory. All applications must disconnect from the database before this can occur. For more information aboutwhich parameters are configurable online and which ones are not, see summary list of configuration parameters.

If an error occurs, the database configuration file does not change. The database configuration file cannot be updated if the checksum is invalid. This might occur if the database configuration file is changed without using the appropriate command. If this happens, the database must be restored to reset the database configuration file.

Compatibilities

For compatibility with previous versions:
  • DBPARTITIONNUM can be substituted for MEMBER, except when the DB2_ENFORCE_MEMBER_SYNTAX registry variable is set to ON.