Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010
    Posts
    2

    unable to connect remotely

    I am new to db2, installed it a few days ago. I am able to work with it locally, using the unixODBC. However, I am unable to connect to db2 from a remote machine.
    I am not sure whether the problem is on the server or the client side, so I'll give info on both:

    I am running 2 virtual machines with centos linux on the same windows host, which can successfully ping each other.

    when running db2start, I get the following message:
    SQL5043N Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully.
    However, in the db2diag.log file (diag level 4) I see
    MESSAGE : DIA3000I "TCPIP" protocol support was successfully started.
    although, I see some "Error" and "Severe" entries there

    configuration:
    [db2inst1@bagvapp sqllib]$ db2set -all
    [i] DB2PROCESSORS=0,1
    [i] DB2COMM=TCPIP
    [i] DB2AUTOSTART=YES
    [g] DB2SYSTEM=bagvapp
    [g] DB2INSTDEF=db2inst1
    [g] DB2ADMINSERVER=dasusr1

    [db2inst1@bagvapp sqllib]$ db2 get dbm cfg |grep -i svce
    TCP/IP Service name (SVCENAME) = 50000
    SSL service name (SSL_SVCENAME) =

    [root@bagvapp ~]# grep -i db2 /etc/services
    ibm-db2 523/tcp # IBM-DB2
    ibm-db2 523/udp # IBM-DB2
    questdb2-lnchr 5677/tcp # Quest Central DB2 Launchr
    questdb2-lnchr 5677/udp # Quest Central DB2 Launchr
    DB2_db2inst1 50000/tcp # This is for SVCENAME
    netstat:
    [root@bagvapp ~]# netstat -nlpt
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1947/portmap
    tcp 0 0 0.0.0.0:50000 0.0.0.0:* LISTEN 26457/db2sysc
    tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2460/cupsd
    tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2716/tcpserver
    tcp 0 0 0.0.0.0:892 0.0.0.0:* LISTEN 1982/rpc.statd
    tcp 0 0 :::22 :::* LISTEN 2451/sshd
    I am using the free edition express-C as follows:
    [db2inst1@bagvapp sqllib]$ db2level
    DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL09071"
    with level identifier "08020107".
    Informational tokens are "DB2 v9.7.0.1", "s091114", "IP23033", and Fix Pack
    "1".
    Product is installed at "/opt/ibm/db2/V9.7".
    On the client side, I use unixODBC and libodbc++ which works ok locally.
    When using the following connection string:
    Code:
    	const string connstring = "DSN=Navajo;Hostname=192.168.99.110;Port=50000;Protocol=TCPIP;Uid=db2inst1;Pwd=zzz;";
    I get the error:
    [unixODBC][IBM][CLI Driver] CLI0199E Invalid connection string attribute. SQLSTATE=08001
    the Data Source is defined in the /etc/odbc.ini as follows:

    [Navajo]
    Description = Navajo Systems DB
    Driver = DB2
    Database = NAVAJO
    Hostname = 192.168.99.110
    Port = 50000
    Protocol = TCPIP
    Uid = db2inst1
    Pwd = zzz
    Note that db2 is also installed on the client machine as they are a replica of one another, but it is stopped.

    Is there a tool with can help me check whether the database is listening properly (perhaps from Windows)?

    Sorry for the long post, tried to be as specific as possible.
    Thanks in advance!

    David

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,649
    It appears to be something on the client side (CLI message) .. Make sure the connection string format is correct ..

    Enable cli trace to get more info and also change the diaglevel to 4 on the client side.

    IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

    A quick one: if you are defining the datasource in odbc.ini , do you still have to give all the connection parameters in the connect string ?



    Quote Originally Posted by DavKa View Post
    I am new to db2, installed it a few days ago. I am able to work with it locally, using the unixODBC. However, I am unable to connect to db2 from a remote machine.
    I am not sure whether the problem is on the server or the client side, so I'll give info on both:

    I am running 2 virtual machines with centos linux on the same windows host, which can successfully ping each other.

    when running db2start, I get the following message:


    However, in the db2diag.log file (diag level 4) I see

    although, I see some "Error" and "Severe" entries there

    configuration:

    netstat:


    I am using the free edition express-C as follows:


    On the client side, I use unixODBC and libodbc++ which works ok locally.
    When using the following connection string:
    Code:
        const string connstring = "DSN=Navajo;Hostname=192.168.99.110;Port=50000;Protocol=TCPIP;Uid=db2inst1;Pwd=zzz;";
    I get the error:

    the Data Source is defined in the /etc/odbc.ini as follows:



    Note that db2 is also installed on the client machine as they are a replica of one another, but it is stopped.

    Is there a tool with can help me check whether the database is listening properly (perhaps from Windows)?

    Sorry for the long post, tried to be as specific as possible.
    Thanks in advance!

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

  3. #3
    Join Date
    Apr 2010
    Posts
    2
    thanks sathyaram_s!

    I copied the connection string from a site that claims that it is tested...

    to your question: I don't know yet. I tried either way, as I am trying to connect also from command-line tools like isql, that don't accept connection string.

    good news, though: I was able to connect from Windows, without any change to the server, so it seems that the error I get on db2start is not crucial.

    On Linux client, though, I can't even select TCPIP in Config. Assist. My hunch is that this is related to the fact that I installed the full DB there, not only the client package.

Posting Permissions

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