When the database is created and/or catalogued in an instance, it record its details in three directory. They are System Database directory, Local database directory and Node directory
The System database directory contain all the database information. The database may be a local database or it can also show the remote database details. Local database is represented with keyword “INDIRECT” and remote database is represented by “REMOTE”.
When the connection to the DB2 Database is made, DB2 first check the details in the System Database directory. If the connection is to the “INDIRECT” database then it check the local database directory. If the connection is to the “REMOTE” database then it check the Node directory.
System Database directory is a binary file with a name SQLDBDIR. On Windows, the file can be located in DB2INSTPROF/
DB2INSTPROF = DB2 Registry variable. If not set then the default value is the DB2 Installed directory path.
INSTHOME = Is the user profile variable which is set to the Instance home directory.
Local Database Directory is a binary file with the name SQLDBDIR. However, this file is different from the System Database directory binary file and also reside in different storage path. On Windows and Linux, the file can be located in DFTDBPATH/
DFTDBPATH = DB2 Database Manager variable which show the default path for creating a new database.