Creating a db2profile for environment variables for DB2

You can create a profile file for each instance of DB2 and place environment variables in the profile file. You can use this profile to create unique variables for each database user. Each DB2 instance has a home directory that is associated with the instance's log on ID, for example:

$InstHome/sqllib/db2profile

Where $InstHome is the name of the logon ID.

Place the variables that you are interested in using (for example the TimeZone variable) in the profile file. When you then issue a su - db2instX command (where X is the instance's name), the environment variables are sourced.