On OS/2, Windows 95, or Windows NT Systems:
When starting or stopping a DB2 server instance, the one that is used is determined by the value of DB2INSTANCE. This is determined as follows:
set db2instance=new_instance_name
On Windows NT, system environment variables are set in System Environment. On Windows 95, they are set in the autoexec.bat file. On OS/2, they are set in the config.sys file. See "DB2 Registry Values and Environment Variables" for instructions on setting DB2INSTANCE on Windows 95 and Windows NT.
Note: | The same search order is used when a client instance is activated by a DB2 call from an application. |
To determine which database instance applies in the current session, enter:
db2set db2instance
On UNIX systems:
To use a specific DB2 instance, you will need to execute the db2profile or db2cshrc file for that instance. You can use the following command to execute db2profile or db2cshrc:
. INSTHOME/sqllib/db2profile (in Bourne or Korn shell) source INSTHOME/sqllib/db2cshrc (in C shell)
where INSTHOME is the home directory of the DB2
instance.
![]() |
To ensure that you are using the correct instance, use the following command: which db2 It will show you the full path name for the DB2 command. This path
should include the home directory of the instance.
|