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

ODBC connection from Linux to DB2

269 views
Skip to first unread message

newtilus

unread,
Dec 8, 2011, 1:33:21 PM12/8/11
to
Hi!

I have a problem defining ODBC connection to DB2 from CentOS 6 (Linux
based on Redhat). I'm almost sure that I've done everything as it
should be, but can you, please, try to find some gaps in my
understanding? Below are the steps:


[root@localhost etc]# cat /etc/odbc.ini
[ODBC]
Trace = yes
Tracefile = /root/odbc_trace.log

[ODBC Data Sources]
UA_SYSTEM_TABLES = IBM DB2 ODBC DRIVER

[UA_SYSTEM_TABLES]
Driver = DB2
Description = UA_SYSTEM_TABLES Data Source
Database = TEST

[root@localhost etc]# cat /etc/odbcinst.ini
[DB2]
Description = DB2 Driver
Driver = /opt/ibm/db2/V9.7/lib32/libdb2.so
DontDLCLose = 1
FileUsage = 1

[root@localhost etc]# odbcinst -i -d -f /etc/odbcinst.ini
odbcinst: Driver installed. Usage count increased to 2.
Target directory is /etc

[root@localhost etc]# odbcinst -i -s -f /etc/odbc.ini

[root@localhost etc]# isql -v UA_SYSTEM_TABLES
[S1009][unixODBC][IBM][CLI Driver] CLI0124E Invalid argument value.
SQLSTATE=S1009
[ISQL]ERROR: Could not SQLConnect
0 new messages