DB2 10.5 for Linux, UNIX, and Windows

Linux and UNIX environment variable settings

Depending on the operating system, values for the environment variables are set, either in the db2profile file (for the Bash or Korn shell) or the db2cshrc file (for the C shell).

Calls to db2profile or db2cshrc files are put in the instance owner's .bashrc (Bash shell) file and either in the .profile (Bash or Korn shell) file or in the .login (C shell) file.

AIX® operating systems:
  • PATH, includes several DB2® directories including sqllib/bin
  • LIBPATH, includes the sqllib/lib directory
HP-UX operating systems:
  • PATH, includes several DB2 directories including sqllib/bin
  • SHLIB_PATH (32 bit and 64 bit) or LD_LIBRARY_PATH (64 bit), includes the sqllib/lib directory
Linux and Solaris operating systems:
  • PATH, includes several DB2 directories including sqllib/bin
  • LD_LIBRARY_PATH, includes the sqllib/lib directory

Empty sqllib/userprofile and sqllib/usercshrc files are created during instance creation. You can place your own instance environment settings into these files. If you do not want the new environment settings in the db2profile or db2cshrc script, you can override them using the corresponding user script, which is called at the end of the db2profile or db2cshrc script. During an instance upgrade, which you perform by using the db2iupgrade command, the user scripts are copied so that your environment modifications are still in use.

You can generate the db2profile file (for the Born and Korn shell) and the db2cshrc file (for the C shell) from a IBM® Data Server Driver Package or IBM Data Server Driver for ODBC and CLI installation by using the installDSDriver command. Running the db2profile or db2cshrc shell script file sets the environment variables as shown in the following list: