The ENV_GET_REG_VARIABLES table function returns the DB2® registry settings from one or all database members.
None
db2set db2dbdft=CORP_1
db2start
Then you can issue a query to show that registry
variable setting:select substr(reg_var_value,1,20) as VALUE,
substr(reg_var_on_disk_value,1,20) as ON_DISK_VALUE
from table(env_get_reg_variables(-1))
where reg_var_name = 'DB2DBDFT'
This query returns the
following output:VALUE ON_DISK_VALUE
-------------------- --------------------
CORP_1 CORP_1
1 record(s) selected.
To demonstrate the difference between in memory and on
disk values for the registry settings, the DB2DBDFT registry variable
is then altered:db2set db2dbdft=DEPT_MAJOR
Running
the same query as the previous one, shows that this new value is immediately
picked up by the ENV_GET_REG_VARIABLES function:VALUE ON_DISK_VALUE
-------------------- --------------------
CORP_1 DEPT_MAJOR
1 record(s) selected.
However, note that the in memory
value will not change to the new value until the DB2 instance is restarted.Column name | Data type | Description |
---|---|---|
MEMBER | SMALLINT | member - Database member monitor element |
REG_VAR_NAME | VARCHAR(256) | Name of the DB2 registry variable. |
REG_VAR_VALUE | VARCHAR(2048) | Current setting of the DB2 registry variable in memory. |
REG_VAR_ON_DISK_VALUE | VARCHAR(2048) | Current setting of the DB2 registry variable on disk. |
IS_AGGREGATE | SMALLINT | Indicates whether or not the DB2 registry variable is an aggregate variable. The possible return values are 0 if it is not an aggregate variable, and 1 if it is an aggregate variable. |
AGGREGATE_NAME | VARCHAR(256) | Name of the aggregate if the DB2 registry variable is currently obtaining its value from a configured aggregate. If the registry variable is not being set through an aggregate, or is set through an aggregate but has been overridden, the value of AGGREGATE_NAME is NULL. |
LEVEL | CHAR(1) | Indicates the level at which the DB2 registry variable acquires its value. The
possible return values and the corresponding levels that they represent
are:
|