Instance directory

The instance directory stores all information that pertains to a database instance. The location of the instance directory cannot be changed after it is created.

The instance directory contains:
  • The database manager configuration file
  • The system database directory
  • The node directory
  • The node configuration file (db2nodes.cfg)
  • Other files that contain debugging information, such as the exception or register dump or the call stack for the Db2® processes.

On Linux® and UNIX operating systems, the instance directory is located in the INSTHOME/sqllib directory, where INSTHOME is the home directory of the instance owner. The default instance can be called anything you want within the naming rules guidelines.

On Windows operating systems, the instance directory is determined based on the DB2INSTPROF system environment variable and defaults to the C:\ProgramData\IBM\DB2\DB2COPY\DB2 directory. DB2INSTPROF defaults to ProgramData\IBM\DB2\<DB2COPY_NAME> file path. The default name of the Db2 copy when the Db2 product is first installed is "DB2COPY1". Further installations on the same machine default to the name of Db2 copy, such as "DB2COPY2", "DB2COPY3" and so on. For each Db2 copy, an instance directory based on the Db2 copy name is set up. The instance name is the same as the name of the service, so it should not conflict. No instance name should be the same as another service name. You must have the correct authorization to create a service.

In a partitioned database environment, the instance directory is shared between all database partition servers belonging to the instance. Therefore, the instance directory must be created on a network share drive that all computers in the instance can access.

db2nodes.cfg

The db2nodes.cfg file is used to define the database partition servers that participate in a Db2 instance. The db2nodes.cfg file is also used to specify the IP address or host name of a high-speed interconnect, if you want to use a high-speed interconnect for database partition server communication.