[unixODBC-support] unixODBC-support] unixODBC --> DB2 issue
Frank Pani
fpani0 at ca.ibm.com
Sat Nov 28 18:43:29 GMT 2009
Thanks .. Nick for the suggestion on using strace.
Having followed all IBM instructions, I took your suggestion and also did a
strace and give the first few lines of output of the strace. It appears
it's looking for the drivers in /home/db2inst1/sqllib/lib64/ when in fact
they are in /usr/lib64. Any comments?
db2inst1 at linuxvm2:~> strace -o strace-echo-output.txt isql -v GSMRTHST
fpani0 <password>
[IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed
[ISQL]ERROR: Could not SQLConnect
db2inst1 at linuxvm2:~> head -25 strace-echo-output.txt
execve("/usr/bin/isql", ["isql", "-v", "GSMRTHST", "fpani0", "<password>"],
[/* 57 vars */]) = 0
brk(0) = 0x80006000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2000001f000
uname({sys="Linux", node="linuxvm2", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/home/db2inst1/sqllib/lib64/tls/libodbc.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/home/db2inst1/sqllib/lib64/libodbc.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/home/db2inst1/sqllib/lib32/tls/libodbc.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/home/db2inst1/sqllib/lib32/libodbc.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib64/tls/libodbc.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib64/libodbc.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\2\1\0\0\0\0\0\0\0\0\0\0\3\0\26\0\0\0\1\0\0\0"..., 832) =
832
fstat(3, {st_mode=S_IFREG|0755, st_size=417040, ...}) = 0
mmap(NULL, 413424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x20000020000
madvise(0x20000020000, 413424, MADV_SEQUENTIAL|0x1) = 0
mmap(0x2000007d000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x5c000) = 0x2000007d000
close(3) = 0
open("/home/db2inst1/sqllib/lib64/tls/libodbcinst.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/home/db2inst1/sqllib/lib64/libodbcinst.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/home/db2inst1/sqllib/lib32/tls/libodbcinst.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/home/db2inst1/sqllib/lib32/libodbcinst.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/lib64/tls/libodbcinst.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib64/libodbcinst.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\2\1\0\0\0\0\0\0\0\0\0\0\3\0\26\0\0\0\1\0\0\0"..., 832) =
832
fstat(3, {st_mode=S_IFREG|0755, st_size=85248, ...}) = 0
From: unixodbc-support-request at mailman.unixodbc.org
To: unixodbc-support at mailman.unixodbc.org
Date: 11/20/2009 08:02 AM
Subject: unixODBC-support Digest, Vol 62, Issue 8
Send unixODBC-support mailing list submissions to
unixodbc-support at mailman.unixodbc.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
or, via email, send a message with subject or body 'help' to
unixodbc-support-request at mailman.unixodbc.org
You can reach the person managing the list at
unixodbc-support-owner at mailman.unixodbc.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of unixODBC-support digest..."
Today's Topics:
1. unixODBC --> DB2 issue (Frank Pani)
2. Re: unixODBC --> DB2 issue (Nick Gorham)
----------------------------------------------------------------------
Message: 1
Date: Thu, 19 Nov 2009 14:09:38 -0400
From: Frank Pani <fpani0 at ca.ibm.com>
Subject: [unixODBC-support] unixODBC --> DB2 issue
To: unixodbc-support at mailman.unixodbc.org
Message-ID:
<OF76D89343.EAC6B20A-ON84257673.00631E8A-84257673.0063C27E at ca.ibm.com>
Content-Type: text/plain; charset="us-ascii"
Hi Folks,
I'm wondering if somebody could help shed some light. I'm trying to use
unixODBC (unixODBC-2.2.11-21.4) to connect to a DB2 database; however, I am
getting the following error.
linuxvm2:/home/db2inst1 # isql -v GSMRTHST fpani0 <password>
[IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed
[ISQL]ERROR: Could not SQLConnect
I can confirm that I can connect to the DB2 database no problem from
command line and have followed instructions for DB2 posted on the unixODBC
site, but to no previal. In other newsgroups postings, I see issues
between 32 and 64 bit versions; however I can confirm that I am using 64
bit of DB2 and unixODBC.
My very simple ini files follow. Could somebody suggest some things to
check? Once I get this working, I'll happy to make suggested changes to
the documentation on unixODBC. Thanks.
/etc/odbc.ini -->
[GSMRTHST]
Description = IBM DB2 ODBC DRIVER
Driver = DB2
odbcinst.ini -->
[DB2]
Description = IBM DB2 ODBC DRIVER
Driver = /home/db2inst1/sqllib/lib/libdb2.so
FileUsage = 1
DontDLClose = 1
UsageCount = 4
[ODBC]
Trace = yes
Tracefile = /tmp/odbctrace.log
UsageCount = 4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20091119/4c536260/attachment-0001.html
>
------------------------------
Message: 2
Date: Thu, 19 Nov 2009 20:34:38 +0000
From: Nick Gorham <nick at lurcher.org>
Subject: Re: [unixODBC-support] unixODBC --> DB2 issue
To: Support for the unixODBC project
<unixodbc-support at mailman.unixodbc.org>
Message-ID: <4B05ABDE.8090705 at lurcher.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Frank Pani wrote:
>
> Hi Folks,
>
> I'm wondering if somebody could help shed some light. I'm trying to
> use unixODBC (unixODBC-2.2.11-21.4) to connect to a DB2 database;
> however, I am getting the following error.
>
> linuxvm2:/home/db2inst1 # isql -v GSMRTHST fpani0 <password>
> [IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on
> SQL_HANDLE_DBC failed
> [ISQL]ERROR: Could not SQLConnect
>
> I can confirm that I can connect to the DB2 database no problem from
> command line and have followed instructions for DB2 posted on the
> unixODBC site, but to no previal. In other newsgroups postings, I see
> issues between 32 and 64 bit versions; however I can confirm that I am
> using 64 bit of DB2 and unixODBC.
>
> My very simple ini files follow. Could somebody suggest some things to
> check? Once I get this working, I'll happy to make suggested changes
> to the documentation on unixODBC. Thanks.
>
Are there any further instructions on IBM's site ?
Failing that yry using strace to see if its trying to open any libs but
failing.
--
Nick
------------------------------
_______________________________________________
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
End of unixODBC-support Digest, Vol 62, Issue 8
***********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20091128/b2272d12/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20091128/b2272d12/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20091128/b2272d12/attachment-0001.gif>
More information about the unixODBC-support
mailing list