DB2 Version 9.7 for Linux, UNIX, and Windows

RESET DATABASE CONFIGURATION command

Resets the configuration of a specific database to the system defaults.

Scope

This command updates all database partitions by default, except when DBPARTITIONNUM is specified to reset only one database partition.

Authorization

One of the following:
  • SYSADM
  • SYSCTRL
  • SYSMAINT

Required connection

Instance. An explicit attachment is not required. If the database is listed as remote, an instance attachment to the remote node is established for the duration of the command.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-RESET--+-DATABASE-+--+-CONFIGURATION-+----------------------->
          '-DB-------'  +-CONFIG--------+   
                        '-CFG-----------'   

>--FOR--database-alias--+----------------------------------+---><
                        '-DBPARTITIONNUM--db-partition-num-'   

Command parameters

FOR database-alias
Specifies the alias of the database whose configuration is to be reset to the system defaults.
DBPARTITIONNUM db-partition-num
If a database configuration reset is to be applied to a specific database partition, this parameter may be used. If this parameter is not provided, the reset will take effect on all database partitions.

Example

Reset the database configuration on a multi-partition instance

A user has a partitioned database environment that has 4 database partitions as defined in the db2nodes.cfg:
10 gilera 0
20 gilera 1
30 motobi 0
40 motobi 1

The user has created the SAMPLE database on the instance. The catalog partition for SAMPLE is on database partition number 10. Let's assume the user is logged on to system motobi.

The following command will reset all the database configuration values for database SAMPLE on all database partitions:
db2 reset db cfg for sample
The following commands will reset all the database configuration values for database SAMPLE, only at database partition number 30:
db2 reset db cfg for sample dbpartitionnum 30
or
export DB2NODE=30
db2 reset db cfg for sample

Usage notes

To view or print a list of the database configuration parameters, use the GET DATABASE CONFIGURATION command.

To change the value of a configurable parameter, use the UPDATE DATABASE CONFIGURATION command.

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.

If an error occurs, the database configuration file does not change.

The database configuration file cannot be reset 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.

The RESET DATABASE CONFIGURATION command will reset the database configuration parameters to the documented default configuration values, where auto_runstats will be ON. Self_tuning_mem will be reset to ON on non-partitioned database environments and to OFF on partitioned database environments.