Environment variables and the profile registries

Environment and registry variables control your Db2® database environment. Use the Db2 profile registries to view and update information about variables and instances.

Before the Db2 database profile registries were introduced, setting environment variables required you to specify a value for an environment variable and restart your computer. You can now use the Db2 profile registries to control most variables that affect your Db2 database environment.

Use the profile registries to control the environment variables from one computer. Different levels of support are provided through the different profiles. You can administer the environment variables remotely by using the Db2 administration server.

A Db2 database is affected by the following profile registries:
  • The Db2 instance-level profile registry contains registry variables for an instance. Values that are defined in this registry override their settings in the global registry.
  • The Db2 global-level profile registry contains settings that are used if a registry variable is not set for an instance. All instances that pertain to a particular copy of Db2 Enterprise Server Edition can access this registry.
  • The Db2 instance node-level profile registry contains variable settings that are specific to a database partition in a partitioned database environment. Values that are defined in this registry override their settings at the instance and global levels.
  • The Db2 user-level profile registry contains settings that are specific to each user. Values that are defined in this registry override their settings in the other registries.
The Db2 database system configures the operating environment by checking for registry values and environment variables and resolving them in the following order:
  1. Environment variables that are set outside the profile registries.
  2. Registry variables that are set with the user-level profile.
  3. Registry variables that are set with the instance node-level profile.
  4. Registry variables that are set with the instance-level profile.
  5. Registry variables that are set with the global-level profile.

The Db2 instance profile registry contains a list of all instances that are associated with the current copy. A list exists for each Db2 copy. You can see the complete list of all the instances that are available on the system by running the db2ilist command. This profile registry does not contain variable settings.