[unixODBC-support] unixODBC & ibmDB2

Ralf Schmitt ralf at bunkertor.net
Mon May 29 14:44:41 BST 2006


Hello list,

i'm writing a tool in c which should connect an ibm AS400 db2 via tcp/ip from 
an linux system.

- I've setup a test environment with db2 v8.2 and unixodbc 2.2.1 on the same 
machine.

- My odbc.ini file looks like this
[sample]
Description = DB2 Sample DB
Driver = DB2-1

- My odbcinst.ini like this 
[DB2-1]
Description             = db2 test driver
Driver          = /home/db2inst1/sqllib/lib/libdb2.so
FileUsage               = 1
DontDLClose             = 1

As you can see I use libdb2.so from the database installation itself. This 
setup works cause 
isql -v sample
connects! And my tool works as it should.

But how can I connect to a remote db2 via tcpip (db not on localhost)?
http://www.unixodbc.org/doc/db2.html
says nothing about it!

I've also tried the actual iSeriesAccess package from IBM with this 
[DB2-2]
Description             = iSeries Access for Linux ODBC Driver
Driver          = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
Setup           = /opt/ibm/iSeriesAccess/lib/libcwbodbcs.so
Threading               = 2
DontDLClose             = 1

but now isql doesn't connect the db with this driver! Hope there is any help 
out there. 

Thanks for reading.

ralf




More information about the unixODBC-support mailing list