If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Incorrect info returned by get dbm cfg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-11, 14:40
csuser csuser is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
Incorrect info returned by get dbm cfg

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.
Reply With Quote
  #2 (permalink)  
Old 08-04-11, 14:42
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
You need to terminate the background process (db2bp). Issue "db2 terminate" after changing the value of DB2INSTANCE.
Reply With Quote
  #3 (permalink)  
Old 08-04-11, 14:48
csuser csuser is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
Thanks for the quick reply!
Reply With Quote
  #4 (permalink)  
Old 08-04-11, 14:58
csuser csuser is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
One more question -
Will TERMINATE affect my session only?
I I understand correctly, it will end the connection to the database for all currently connected apps/users.

Thanks again.
Reply With Quote
  #5 (permalink)  
Old 08-04-11, 16:25
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
TERMINATE only affects your shell environment. Other applications will be unaffected.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On