DB2 environment variables
Set all of the following required environment variables for your operating system on the target machine.
AIX® environment variables
Note: You must ensure these environment variable values prepend
any existing entries of the same environment variables.
All environment variables must be capitalized.
| Environment Variable | Value | Conditions |
|---|---|---|
| DB2DIR | DB2® software installation path | where DB2DIR is the location where the DB2 client/server software is installed. |
| DB2INSTANCE | DB2 database instance name | where DB2INSTANCE is the name of the DB2 database instance you have created. |
| LIBPATH | $DB2DIR/lib64:INSTALLDIRECTORY/lib | where DB2DIR is the location where the DB2 client/server software is installed, and where INSTALLDIRECTORY is the location where the product will be installed. |
Linux environment variables
| Environment Variable | Value | Conditions |
|---|---|---|
| DB2DIR | DB2 software installation path | where DB2DIR is the location where the DB2 client/server software is installed. |
| DB2INSTANCE | DB2 database instance name | where DB2INSTANCE is the name of the DB2 database instance you have created. |
| LD_LIBRARY_PATH | $DB2DIR/lib64:INSTALLDIRECTORY/lib | where DB2DIR is the location where the DB2 client/server software is installed, and where INSTALLDIRECTORY is the location where the product will be installed. |
Microsoft Windows environment variables
You must use the Microsoft Windows 8.3 naming convention when setting up environment variables in a Microsoft Windows environment. The environment variables must not contain any spaces.
| Environment Variable | Value | Conditions |
|---|---|---|
| DB2DIR | DB2 software installation path | where DB2DIR is the location where the DB2 instance was created. Some versions of DB2 instead set DB2_HOME or DB2PATH. The installer will look for these if DB2DIR is not found. |
| DB2INSTANCE | DB2 database instance name | where DB2INSTANCE is the name of the DB2 database instance you have created. |
| DB2CODEPAGE | Set equal to the CODEPAGE value of the DB2 database. | A mismatch can cause encoding issues for Latin-1/UTF-8 data on data-load. |