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 > How to change the current Instance

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-05, 12:02
mohd mohd is offline
Registered User
 
Join Date: Jul 2003
Posts: 63
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
Reply With Quote
  #2 (permalink)  
Old 02-18-05, 12:13
przytula przytula is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 02-18-05, 12:25
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
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