IBM Books

Quick Beginnings


Setting Your Environment on UNIX Systems

It is strongly recommended that all DB2 specific registry values be defined in the DB2 profile registry. If DB2 variables are set outside of the registry, remote administration of those variables will not be possible.

On UNIX, you must set the system environment variable DB2INSTANCE.

The scripts db2profile (for Bourne shell or Korn shell) and db2cshrc (for C shell) are provided as examples to help you set up the database environment. You can find these files in INSTHOME/sqllib, where INSTHOME is the home directory of the instance owner.
Note:Except for PATH and DB2INSTANCE, all other DB2-supported variables must be set in the DB2 profile registry. To set variables that are not supported by DB2, define them in your db2profile or db2cshrc file.

An instance owner or SYSADM user may customize these scripts for all users of an instance. Alternatively, you can copy and customize a script, then invoke a script directly or add it to your .profile or .login file.

To work with another instance for the current session, execute the db2profile (for Bourne shell or Korn shell) or the db2cshrc (for C shell) in the sqllib directory of the instance's home directory.
Note:To ensure that your search path has been set up correctly, execute the following command:
   which db2
This command returns the absolute path of the DB2 CLP executable. Verify that it is located under the instance's sqllib directory.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]