On OS/2 and Windows 32-bit operating systems:
When you enter commands to start or stop an instance's database manager, DB2 applies the command to the current instance. DB2 determines the current instance as follows:
set db2instance=new_instance_name
where new_instance_name represents the instance that you want to work with.
To set the db2instdef registry value globally, enter:
db2set db2instdef=new_instance_name -g
where new_instance_name represents the instance that you want to be the default for your system.
For more information on setting registry values, refer to Chapter 41. Controlling Your DB2 Environment.
On UNIX Systems:
To use a specific instance, you need to execute the startup script for that instance. Enter the following command:
. INSTHOME/sqllib/db2profile (for Bourne or Korn shell) source INSTHOME/sqllib/db2cshrc (for C shell)
where INSTHOME is the home directory of the instance.
To determine which instance applies in the current session, enter:
db2 get instance