Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ODBC db2 connect

51 views
Skip to first unread message

Peter van Oers

unread,
Jun 3, 2000, 3:00:00 AM6/3/00
to
Hello,

I'm trying to configure unixODBC with the odbc driver of db2 connect
(libdb2.so) on Linux machine (RH 6.2). I can't find the setup string
(driver).
If I make a .odbc.ini by hand I can use DataManager to connect to my db2
sample database but I can't use the ODBCconfig because it need the setup
string.

The next step for me is to realize a odbc connection to an AS/400, but
first things first.

I've looked al over the internet but there isn't much informatie on using de
db2 connect odbc on Linux.

I hope someone can give some direction to search.

Thanks in advance

Peter van Oers
Netherlands


Nick Gorham

unread,
Jun 3, 2000, 3:00:00 AM6/3/00
to Peter van Oers
Peter van Oers wrote:

Hi,

As you may have seen on the unixodbc site I have managed to get db2 to connect
using unixODBC, however it was very much a trial and error thing, setting up a
db2inst1 user, then setting the DB2INSTANCE environ var to that before
connecting. Because of this I don't know if there are any odbc.ini entries
I could set, as I dont think the driver lib will look at it, If anyone out
there could provide more details, or maybe point me to documentation about
setting up a connection I could create a FAQ entry on the subject. I can create
a setup lib if there are any worthwile entries to add to it.

Does anyone know what other options can be passed in on the connect string, It
would be nice to document them as well.

BTW I know of least one person who has connected to a AS400 via libdb2.so and
unixODBC, so it cane be done.

--
Nick Gorham, ni...@lurcher.org
"They laughed at Galileo. They laughed at Newton.
But they also laughed at Bozo the Clown." -- Carl Sagan.


Peter van Oers

unread,
Jun 4, 2000, 3:00:00 AM6/4/00
to
Hi Nick,

Thanks for your quick response.

I searched the unixODBC site again and I couldn't find your article.
I suppose this kind of information normaly could be found at theIBM db2 site
or is the setup string specific unixODBC ?

My postgres driver is working fine with unixODBC so I unixodbc isn't the
problem.

My final goal is to connect to a AS/400 database but I supose when the local
db2 database is working the step to the AS/400 shouldn't be so difficult.

Nick Gorham <ni...@lurcher.org> schreef in berichtnieuws
39395304...@lurcher.org...

Nick Gorham

unread,
Jun 4, 2000, 3:00:00 AM6/4/00
to Peter van Oers
Peter van Oers wrote:

> Hi Nick,
>
> Thanks for your quick response.
>
> I searched the unixODBC site again and I couldn't find your article.
> I suppose this kind of information normaly could be found at theIBM db2 site
> or is the setup string specific unixODBC ?
>
> My postgres driver is working fine with unixODBC so I unixodbc isn't the
> problem.
>
> My final goal is to connect to a AS/400 database but I supose when the local
> db2 database is working the step to the AS/400 shouldn't be so difficult.

I use the following odbcinst.ini

[DB2]
Description = DB2 Driver
Driver = /usr/IBMdb2/V6.1/lib/libdb2.so
FileUsage = 1
DontDLClose = 1

The DontDLClose in important, the db2 lib doesn't like being unloaded, so this
fixes that

and the following odbc.ini

[sample]
Description = Test to DB2
Driver = DB2

I alse have to set the environment var

export DB2INSTANCE=db2inst1

0 new messages