Configuration parameters

When you create a Db2® database instance or a database, a configuration file is created with default parameter values. You can modify these parameter values to improve performance and other characteristics of the instance or database.

The disk space and memory allocated by the database manager on the basis of default values of the parameters might be sufficient to meet your needs. In some situations, however, you might not be able to achieve maximum performance using these default values.

Configuration files contain parameters that define values such as the resources allocated to the Db2 database products and to individual databases, and the diagnostic level. There are two types of configuration files:
  • The database manager configuration file for each Db2 instance
  • The database configuration file for each individual database.

The database manager configuration file is created when a Db2 instance is created. The parameters it contains affect system resources at the instance level, independent of any one database that is part of that instance. Values for many of these parameters can be changed from the system default values to improve performance or increase capacity, depending on your system's configuration.

There is one database manager configuration file for each client installation as well. This file contains information about the client enabler for a specific workstation. A subset of the parameters available for a server are applicable to the client.

Database manager configuration parameters are stored in a file named db2systm. This file is created when the instance of the database manager is created. In Linux® and UNIX environments, this file can be found in the sqllib subdirectory for the instance of the database manager. In Windows, the default location of this file varies from edition to edition of the Windows family of operating systems. You can verify the default directory on Windows, check the setting of the DB2INSTPROF registry variable using the command db2set DB2INSTPROF. You can also change the default instance directory by changing the DB2INSTPROF registry variable. If the DB2INSTPROF variable is set, the file is in the instance subdirectory of the directory specified by the DB2INSTPROF variable.

Other profile-registry variables that specify where run-time data files should go should query the value of DB2INSTPROF. This includes the following variables:
  • DB2CLIINIPATH
  • diagpath
  • spm_log_path

All database configuration parameters are stored in a file named SQLDBCONF. You cannot directly edit these files. You can only change or view these files via a supplied API or by a tool which calls that API.

In a partitioned database environment, this file resides on a shared file system so that all database partition servers have access to the same file. The configuration of the database manager is the same on all database partition servers.

Most of the parameters either affect the amount of system resources that are allocated to a single instance of the database manager, or they configure the setup of the database manager and the different communications subsystems based on environmental considerations. In addition, there are other parameters that serve informative purposes only and cannot be changed. All of these parameters have global applicability independent of any single database stored under that instance of the database manager.

A database configuration file is created when a database is created, and resides where that database resides. There is one configuration file per database. Its parameters specify, among other things, the amount of resource to be allocated to that database. Values for many of the parameters can be changed to improve performance or increase capacity. Different changes might be required, depending on the type of activity in a specific database.

Figure 1. Relationship between database objects and configuration files
Graphic depicting relationship between database objects and configuration files