[unixODBC-support] Isql error on AIX 6.1

David Ritter David.Ritter at roguewave.com
Tue Sep 2 15:53:47 BST 2014


I *think* I may see the problem.  If you are using a 64-bit build of unixODBC it will not be able to dlopen the 32-bit DB2 client library (which is what you have specified in your odbcinst.ini).

The 64-bit library will require a Driver entry that looks like this (from my AIX system):

Driver=/db/db2/v9.7fp7/db9707c2/sqllib/lib64/db2o.o

So I think for yours:

[DB2]
Description     = DB2 driver
Driver          =  /home/db2/dsalldvi/sqllib/lib64/db2o.o

And of course make sure that /home/db2/dsalldvi/sqllib/lib64 is set in your LIBPATH environment variable (which it looks like it is).

Hth,
Dave

From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick Gorham
Sent: Friday, August 29, 2014 3:30 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Isql error on AIX 6.1

On 29/08/14 20:35, Dove, Charles wrote:
To support:
    On AIX 6.1 trying to use unixODBC to connect to DB2
64 bit compile of unixODBC version 2.3.2

Odbcinst.ini
[ODBC]
Trace           = yes
TraceFile       = /tmp/sql.log

[DB2]
Description     = DB2 driver
Driver          =  /home/db2/dsalldvi/sqllib/lib/db2o.o

Odbc.ini
[sample]
Description = DB2 test
Driver =  DB2
Database = DSTFBDV
Servername = aadarsvrmsd11d.aaa.com
Port = 51010

DB2LIB=/home/db2/dsalldvi/sqllib/lib
IBM_DB_LIB=/home/db2/dsalldvi/sqllib/lib
LIBPATH=/usr/local/unixODBC/lib::/usr/lib:/lib:/usr/local/lib:/opt/freeware/lib:/usr/local/samba/lib:/home/db2/dsalldvi/sqllib/lib64:/home/db2/dsalldvi/sqllib/lib
LD_LIBRARY_PATH=/usr/local/unixODBC/lib:/home/db2/dsalldvi/sqllib/lib64:/home/db2/dsalldvi/sqllib/lib

Isql -v sample   gets following error
[unixODBC][Driver Manager]Can't open lib '/home/db2/dsalldvi/sqllib/lib/db2o.o' : file not found


This is the 64bit driver and file is in current location. I have run ldd on the file and nothing is missing!?!?!?!?

Any help would be greatly appreciated

Just about whenever I have seen that error its from a dependent lib. Haver you got anything like strace/truss to watch the OS loading the lib and see where it gives up?

--
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20140902/58488937/attachment.html>


More information about the unixODBC-support mailing list