Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    63

    Unanswered: How to change the current Instance

    Hi,

    I am usign DB2 V8.1 solaris.

    I have two instances created inst1 and inst2

    Inst1 is the current instance, i want to change current instance to isnt2 so that i can work with db in it.

    when i give $db2 get instance it returns "isnt1"
    Now i want to change the current instance to "Inst2"

    I have given this command $db2 attach to inst2 user inst2usr1 using inst2usr

    now when i give $db2 get instance it is still returning "inst1"

    what i am missing here?

    Thx
    Mohd

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    instance

    if attached to an instance : you are not that instance : you can execute commands that need an attachment to this instance.
    If the db list is needed : export DB2INSTANCE:inst2 or execute the profile of the other instance and you will think as the other instance
    Best Regards, Guy Przytula
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Before you set the profile of the other instance, do a 'db2 terminate' ... This refreshes the directory cache .. Otherwise, you will be able to list the db directory of the other instance but when you connect, you may get 'db not found' error

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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