Experts,
I have the following problem on a server installed with multiple instances - X, Y, ...
if I open a shell and run:
export DB2INSTANCE=X
/opt/db2/V9.1/bin/db2 "get dbm cfg"
--> I get the right result
If I continue using the same session/shell and run:
unset DB2INSTANCE
export DB2INSTANCE=Y
/opt/db2/V9.1/bin/db2 "get dbm cfg"
--> I get the info for X
If I first run it for Y and then run it for X, then in both cases I'll get the info for Y.
In other words, within a specific shell I'm getting the output of the first instance for which I run "get dbm cfg" in subsequent "get dbm cfg" executions even though I'm changing DB2INSTANCE.
* All run under the same installation (checked with db2ilist).
* PATH has no reference to the instance name other than of course in DB2INSTANCE.
* Working with ksh/sh
What am I doing wrong? Would highly appreciate any help!
Note - I have limited access to the environment on which the issue occurs.