Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Posts
    3

    Unanswered: 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.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    You need to terminate the background process (db2bp). Issue "db2 terminate" after changing the value of DB2INSTANCE.

  3. #3
    Join Date
    Aug 2011
    Posts
    3
    Thanks for the quick reply!

  4. #4
    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.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    TERMINATE only affects your shell environment. Other applications will be unaffected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •