Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Location
    Ohio
    Posts
    38

    Question Unanswered: 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:
    [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

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  3. #3
    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:

    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

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

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

Posting Permissions

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