Identifying the current instance
Most commands that you issue or configuration changes that you make apply by default to the current instance. You can identify the current instance by checking the values of certain environment variables.
About this task
When you run commands to start or stop the database manager for an instance, the database manager applies the command to the current instance. To determine the current instance, the database manager checks the values of certain environment variables in the following order:
- The value of the DB2INSTANCE environment variable for the current session.
- The value of the DB2INSTANCE system environment variable.
- On Windows operating systems, the value of the DB2INSTDEF registry variable.
Procedure
To identify the current instance:
Check the value of the relevant environment variable.
Option | Description |
---|---|
View the value of the DB2INSTANCE environment variable for the current session. | Issue the following command:
|
View the value of the DB2INSTANCE system environment variable. |
|
View the value of the DB2INSTDEF registry variable. | Issue the following command:
|