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 > Client Config - Multiple instances on same box

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-25-04, 10:31
jodie jodie is offline
Registered User
 
Join Date: Aug 2003
Location: Ohio
Posts: 38
Question Client Config - Multiple instances on same box

Hi!
I'm sure this question has been asked before, but the search function isn't working...

I have a machine (AIX) with several databases. Almost all are in instance DB2INST1 owned by user db2inst1. I have one other DB in instance LDAPDB2. It is owned by user ldapdb2.

When I use the Client Configuration, I can connect to all of the DBs in instance DB2INST1, but when I try LDAPDB2, I get:
Quote:
[IBM][CLI Driver] SQL1013N The database alias name or database name "LDAPDB2" could not be found. SQLSTATE=42705
The database is registered on the server when I do a "List db directory". I have tried setting up a tcpip node (on the same port as DB2INST1) and registering a remote db as well. No luck.

Code:
 System Database Directory

 Number of entries in the directory = 2

Database 1 entry:

 Database alias                  = LDAP
 Database name                   = LDAPDB2
 Node name                       = NODE2
 Database release level          = 9.00
 Comment                         =
 Directory entry type            = Remote
 Catalog node number             = -1

Database 2 entry:

 Database alias                  = LDAPDB2
 Database name                   = LDAPDB2
 Local database directory        = /home/ldapdb2
 Database release level          = 9.00
 Comment                         =
 Directory entry type            = Indirect
 Catalog node number             = 0

$ db2 list node directory

 Node Directory

 Number of entries in the directory = 1

Node 1 entry:

 Node name                      = NODE2
 Comment                        =
 Protocol                       = TCPIP
 Hostname                       = xxxxxx
 Service name                   = 50002
I X'd out the hostname above for security reasons.

Anybody have any ideas about the problem? Can we have two instances use the same port?

Thanks!
Jodie
Reply With Quote
  #2 (permalink)  
Old 05-25-04, 10:41
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You cannot have two instances listening on the same port ... The ports have to be different ...

Instead of cataloging ldapdb2 as a tcpip node, you may as well do,

db2 catalog local node ldapdb2
db2 catalog database ldap at node ldapdb2

HTH

sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 05-25-04, 11:08
jodie jodie is offline
Registered User
 
Join Date: Aug 2003
Location: Ohio
Posts: 38
Quote:
Originally Posted by sathyaram_s
You cannot have two instances listening on the same port ... The ports have to be different ...

Instead of cataloging ldapdb2 as a tcpip node, you may as well do,

HTH

sathyaram
Thanks for the help.
I changed the node to 50004, and made sure it was in my /etc/services file. But now I get:

Quote:
The connection test failed.

[IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "connect". Protocol specific error code(s): "10061", "*", "*". SQLSTATE=08001
I'm researching this now... but if you have any ideas, that would be great!



Quote:
Originally Posted by sathyaram_s
db2 catalog local node ldapdb2
db2 catalog database ldap at node ldapdb2
How does this work if I'm trying to connect from a Windows client to an AIX box? I thought I had to do TCPIP, since the db is not local to windows.

Thanks!
Jodie
Reply With Quote
  #4 (permalink)  
Old 05-25-04, 11:15
sathyaram_s sathyaram_s is online now
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Sorry, catalog "local" will not work if you are connecting from a "remote" machine ...

As for the comm error,
What is your SVCENAME for ldapdb2 instace

db2 get dbm cfg | grep SVCENAME

Is this the service name in your /etc/services file ?

You can update the config using
db2 update dbm cfg using SVCENAME <servicename>

Also, check if your DB2COMM parameter is set to TCPIP

db2set -all shoud list
DB2COMM=TCPIP
otherwise, use
db2set DB2COMM=TCPIP to set the variable ...

And finally, restart the instance for db2 to pick up the new listner config ..

Also, check
netstat -an | grep <portnumber>
The port should be LISTENing

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 05-25-04, 12:09
jodie jodie is offline
Registered User
 
Join Date: Aug 2003
Location: Ohio
Posts: 38
Thanks!

Thanks so much. That did the trick. I had to set both the SVCENAME and the DB2COMM parameter.

The other instance was already set up that way... not sure who did it since I didn't!

Thanks again!
Jodie
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