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:
Quote:
|
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
Quote:
|
MESSAGE : DIA3000I "TCPIP" protocol support was successfully started.
|
although, I see some "Error" and "Severe" entries there
configuration:
Quote:
[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:
Quote:
[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:
Quote:
[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:
Quote:
|
[unixODBC][IBM][CLI Driver] CLI0199E Invalid connection string attribute. SQLSTATE=08001
|
the Data Source is defined in the /etc/odbc.ini as follows:
Quote:
[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