DB2 Version 10.1 for Linux, UNIX, and Windows

Displaying and altering the global registry (UNIX) using db2greg

You can view the global registry using the db2greg command on UNIX and Linux platforms.

In DB2® Version 9.7 and higher, the DB2 global profile registries are not recorded in the text file <DB2DIR>/default.env. The global registry file global.reg is now used to register the DB2 global profile settings related to the current DB2 installation.

The global registry exists only on UNIX and Linux platforms:
  • For root installations, the global registry file is located at /var/db2/global.reg (/var/opt/db2/global.reg on HP-UX).
  • For non-root installations, the global registry file is located at $HOME/sqllib/global.reg, where $HOME is the non-root user's home directory.
The global registry consists of three different record types:
  • "Service": Service records contain information at the product level - for example, version, and install path.
  • "Instance": Instance records contain information at the instance level - for example, Instance name, instance path, version, and the "start-at-boot" flag.
  • "Variable": Variable records contain information at the variable level - for example, Variable name, Variable value.
  • Comment.

You can view the global registry with the db2greg tool. This tool is located in sqllib/bin, and in the install directory under bin as well (for use when logged in as root).

You can edit the global registry with the db2greg tool. Editing the global registry in root installations requires root authority.

Only use the db2greg in specific cases as instructed, or when requested to do so by IBM Software Support. Incorrect usage of this command can damage the global registry.