Thread: unable to connect remotely
04-18-10, 07:55 #1Registered User
- Join Date
- Apr 2010
Unanswered: 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.
MESSAGE : DIA3000I "TCPIP" protocol support was successfully started.
[db2inst1@bagvapp sqllib]$ db2set -all
[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
[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
[db2inst1@bagvapp sqllib]$ db2level
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL09071"
with level identifier "08020107".
Informational tokens are "DB2 v126.96.36.199", "s091114", "IP23033", and Fix Pack
Product is installed at "/opt/ibm/db2/V9.7".
When using the following connection string:
const string connstring = "DSN=Navajo;Hostname=192.168.99.110;Port=50000;Protocol=TCPIP;Uid=db2inst1;Pwd=zzz;";
[unixODBC][IBM][CLI Driver] CLI0199E Invalid connection string attribute. SQLSTATE=08001
Description = Navajo Systems DB
Driver = DB2
Database = NAVAJO
Hostname = 192.168.99.110
Port = 50000
Protocol = TCPIP
Uid = db2inst1
Pwd = zzz
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!
04-19-10, 03:14 #2Super Moderator
- Join Date
- Aug 2001
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 ?
Visit the new-look IDUG Website , register to gain access to the excellent content.
04-19-10, 03:48 #3Registered User
- Join Date
- Apr 2010
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.