Setting environment variables outside the profile registries on Windows

On Windows operating systems, the DB2INSTANCE, DB2NODE, and DB2PATH environment variables can be set only outside the profile registries. You are required to set only the DB2PATH variable.

About this task

On Windows operating systems, the following environment variables are set outside the profile registries:
  • The DB2INSTANCE environment variable specifies the instance that is active by default. If this variable is not set, the Db2® database manager uses the value of the DB2INSTDEF variable as the current instance.
  • The DB2NODE environment variable specifies the target logical node of a database partition server to which requests are routed.
  • The DB2PATH environment variable specifies the directory where the Db2 database product is installed on Windows 32-bit operating systems.
If you want to set any other variables, those variables must be set in one or more of the profile registries.
You can determine the value of an environment variable by using the echo command. For example, to check the value of the DB2NODE environment variable, issue the following command:
echo %db2path%


To set an environment variable outside the profile registries:

Set an environment variable by using one of the following options.
Option Description
Set the environment variable at the instance level.
  1. Follow the appropriate procedure for your Windows operating system.
  2. Restart your computer.
Set the environment variable for the current session. Issue the following command:
set env_variable_name=new_value
Set the environment variable for the current session for a C shell. Issue the following command:
setenv env_variable_name new_value