IBM Books

Quick Beginnings for DB2 Universal Database for UNIX


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 sample script files, db2profile (for Bourne or Korn shell) and db2cshrc (for C shell), are provided to help you set the database environment. These scripts are available in the INSTHOME/sqllib directory, 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 script files, db2profile or db2cshrc.

An instance owner or SYSADM user may customize these script files for all users of an instance. Alternatively, you can copy and customize a script file, 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 script file (for Bourne shell or Korn shell) or the db2cshrc script file (for C shell) in the sqllib directory of the instance's home directory.


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

[ DB2 List of Books | Search the DB2 Books ]