[unixODBC-support] Unable to get isql working on AIX 7.1

Sundar Mahadevan sundarmahadevan82 at gmail.com
Fri Jan 29 14:38:40 GMT 2016


Hi All,
I spent all day yesterday and could not find what is wrong with my config.
I did a trace with strace and notice some errors in the log snippet
attached below. I see tons of errors "T h e   s y s t e m   c"
for /usr/lib/nls/msg/en_US/libc.cat but the file exists. Any help is
greatly appreciated. Thanks.


40828946: 99024971: kload("/usr/lib/nls/loc/en_US__64", 128,
"/u01/app/oracle/product/11gR204/db_1/lib:/u13/app/DBCLIENT/sql
lib/lib64:/home/oracle/bin/UnixOdbcDriverManager/lib") = 648518346072919080
40828946: 99024971:
kopen("/home/oracle/bin/UnixOdbcDriverManager/etc/odbcinst.ini", O_RDONLY)
= 3
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 249
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 0
40828946: 99024971: close(3)                            = 0
40828946: 99024971: kopen("/u13/app/DBCLIENT/.odbcinst.ini", O_RDONLY)
Err#2  ENOENT
40828946: 99024971:
kopen("/home/oracle/bin/UnixOdbcDriverManager/etc/odbcinst.ini", O_RDONLY)
= 3
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 249
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 0
40828946: 99024971: close(3)                            = 0
40828946: 99024971: kopen("/u13/app/DBCLIENT/.odbcinst.ini", O_RDONLY)
Err#2  ENOENT
40828946: 99024971:
kopen("/home/oracle/bin/UnixOdbcDriverManager/etc/odbcinst.ini", O_RDONLY)
= 3
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 249
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 0




40828946: 99024971: statx("/etc/passwd", 0x0FFFFFFFFFFFC470, 176, 0) = 0
40828946: 99024971: kopen("/etc/passwd.id.idx", O_RDONLY)       Err#2
 ENOENT
40828946: 99024971: _getpid()                           = 40828946
40828946: 99024971: _getpid()                           = 40828946
40828946: 99024971: kopen("/etc/passwd", O_RDONLY)      = 4
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kfcntl(4, F_GETFD, 0x0000000000000000) = 0
40828946: 99024971: kfcntl(4, F_SETFD, 0x0000000000000001) = 0
40828946: 99024971: kfcntl(4, 13, 0x0FFFFFFFFFFFC770)   = 0
40828946: 99024971: lseek(4, 0, 1)                      = 0
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(4, " r o o t : ! : 0 : 0 : 7".., 4096) = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179



40828946: 99024971: kopen("/etc/passwd", O_RDONLY)      = 4
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kfcntl(4, F_GETFD, 0x0000000000000000) = 0
40828946: 99024971: kfcntl(4, F_SETFD, 0x0000000000000001) = 0
40828946: 99024971: kfcntl(4, 13, 0x0FFFFFFFFFFFC860)   = 0
40828946: 99024971: lseek(4, 0, 1)                      = 0
40828946: 99024971: lseek(4, 3000, 0)                   = 3000
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(4, "\n d b c l i e n t : ! :".., 4096) = 179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179

And i see a tons of the error below.

17694742: 38535315: access("/usr/lib/nls/msg/en_US/libc.cat", 0) = 0
17694742: 38535315: _getpid()                           = 17694742
17694742: 38535315: kopen("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 3
17694742: 38535315: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
17694742: 38535315: kfcntl(3, F_SETFD, 0x0000000000000001) = 0
17694742: 38535315: kioctl(3, 22528, 0x0000000000000000,
0x0000000000000000) Err#25 ENOTTY
17694742: 38535315: kread(3, "\0\001 ù\007\007 I S O 8".., 4096) = 4096
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: _getpid()                           = 17694742
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: lseek(3, 8077, 0)                   = 8077
17694742: 38535315: kread(3, " T h e   s y s t e m   c".., 4096) = 4096
17694742: 38535315: close(3)                            = 0


oracle at omsa4103:SUPCON(/home/oracle/sm)> ll /usr/lib/nls/msg/en_US/libc.cat
-rw-r--r--    1 bin      bin           21046 Sep 06 2013
 /usr/lib/nls/msg/en_US/libc.cat



On Thu, Jan 28, 2016 at 10:03 AM, Sundar Mahadevan <
sundarmahadevan82 at gmail.com> wrote:

> Hi Kevin and Nick,
> Many thanks for your help. I was able to get isql working. I needed to
> unset LIBPATH on my aix machine and it started working. I am trying to test
> my db2 database connection with isql and i cant get it to work. Could you
> please assist? Thanks.
>
> oracle at omsa4103:SUPCON(/home/oracle/bin/UnixOdbcDriverManager/etc)> cat
> odbc.ini
> [BPMSIT]
> Description     = ODBC for DB2
> Driver          = /u13/app/DBCLIENT/sqllib/lib64/db2_64.o
> Database        = BPMDB
> Instance        = psinst1
> Protocol        = TCPIP
> Hostname        = oms420.omers.com
> ServiceName     = 50000
> uid             = db2ro
> pwd             = *****
>
> oracle at omsa4103:SUPCON(/home/oracle/bin/UnixOdbcDriverManager/etc)> cat
> odbcinst.ini
> [BPMSIT]
> Description     = IBM DB2 ODBC driver (64-bit)
> Driver          = /u13/app/DBCLIENT/sqllib/lib64/db2_64.o
> FileUsage       = 1
> DontDLClose     = 1
> Debug           = 1
> CommLog         = 1
>
> [ODBC]
> Trace           = Yes
> TraceFile       = /tmp/odbctrace.out
>
> dbclient at omsa4103:SUPCON(/u13/app/DBCLIENT)> \rm /tmp/odbctrace.out
>
> dbclient at omsa4103:SUPCON(/u13/app/DBCLIENT)> env | grep ODBCINI
> ODBCINI=/home/oracle/bin/UnixOdbcDriverManager/etc/odbc.ini
>
> dbclient at omsa4103:SUPCON(/u13/app/DBCLIENT)> export DB2INSTANCE=psinst1
> dbclient at omsa4103:SUPCON(/u13/app/DBCLIENT)> isql -v BPMSIT
> [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on
> SQL_HANDLE_HENV failed
> [ISQL]ERROR: Could not SQLConnect
> dbclient at omsa4103:SUPCON(/u13/app/DBCLIENT)> cat /tmp/odbctrace.out
> .
> .
> .
> [[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV
> failed]
> .
> .
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20160129/b2e9c60f/attachment.html>


More information about the unixODBC-support mailing list