Directory structure for your installed Db2 database product (Linux®)

During a root installation, you can specify where the subdirectories and files for the Db2 database product will be created. For non-root installations, you cannot choose where Db2 products are installed; you must use the default locations.

Note: For non-root installations, all Db2 files (program files and instance files) are located in or beneath the $HOME/sqllib directory, where $HOME represents the non-root user's home directory.
After installation, the Db2 objects are created in various directories. The following table shows the location of Db2 objects after a default root installation.
Table 1. Location of Db2 objects after a default root installation
Db2 Object Location
DAS home directory home/dasusr1
DAS information home/dasusr1/das
Database configuration file SQLDBCON home/db2inst1/db2inst1/NODE0000/SQL00001
Database directory
Contains files needed for:
  • buffer pool information
  • history information
  • log control files
  • storage path information
  • table space information
home/db2inst1/db2inst1/NODE0000/SQL00001
Database manager configuration file db2systm home/db2inst1/sqllib
Db2 commands /opt/ibm/db2/V11.5/bin
Db2 error messages file (db2diag log file) home/db2inst1/sqllib/db2dump
Db2 installation path default is /opt/ibm/db2/V11.5
Directory for event monitor data home/db2inst1/db2inst1/NODE0000/SQL00001/db2event
Directory for transaction log files home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000
Installation log file db2install.history /opt/ibm/db2/V11.5/install/logs
Instance home directory home/db2inst1
Instance information home/db2inst1/sqllib
Local database directory for the instance home/db2inst1/db2inst1/NODE0000/sqldbdir
Partitioned database environment file db2nodes.cfg home/db2inst1/sqllib
System database directory home/db2inst1/sqllib/sqldbdir

The following figures illustrate an example of the Db2 directory structure after a root installation. In these examples, there are two instances, db2inst1 and db2inst2.

Directory structure - default local database directory information for the Db2 instance db2inst1

Directory structure - local directory information
  1. Local database directories.
  2. Database configuration file

Directory structure - directory information for the Db2 instance db2inst1

Directory structure - directory information
  1. The db2diag log files in this directory logs Db2 error messages.
  2. System database directory
  3. The db2nodes.cfg file is used in a partitioned database environment.
  4. Database manager configuration file

The dasusr1 directory contains the Db2 administration server (DAS) configuration files and the symbolic links to Db2 core files.

Directory structure - install log file location

Location of your Db2 log file

This figure illustrates the location of your install log file. If there were multiple installations under the same installation path, the db2install.history file will be indexed as db2install.history.n where n represents a four digit number, for example, 0000, or 0001.

The Db2 installation directory /opt/ibm/db2/V11.5 contains the installed Db2 files.