• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3093
  • Last Modified:

ODBC access to iSeries from 64-bit linux

I’m attempting to access an iSeries database using ODBC and Ubuntu 12.04 server. This works fine from the 32bit version of Ubuntu and windows. However the 64-bit version of Ubuntu is proving to be more difficult. I have installed unixodbc and the iSeries access for Linux.  I configured the /etc/odbcinst.ini and /etc/odbc.ini. when I run isql –v “dsn_name” I get the error:

[01000][unixODBC][Driver Manager]Can't open lib '/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect

Here is an example of my odbcinst.ini file:
[iSeries Access ODBC Driver]
Description             = iSeries Access for Linux ODBC Driver
Driver          = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
Setup           = /opt/ibm/iSeriesAccess/lib/libcwbodbcs.so
NOTE1           = If using unixODBC 2.2.11 or later and you want the 32 and 64-bit ODBC drivers to share DSN's,
NOTE2           = the following Driver64/Setup64 keywords will provide that support.
Driver64                = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup64         = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading               = 2
DontDLClose             = 1
UsageCount              = 1

And my /etc/odbc.ini file:
Description = iSeries Access ODBC Driver DSN for iSeries
Driver = iSeries Access ODBC Driver
System = ip address here
UserID = my_username
Password = my_password
Naming = 0
DefaultLibraries = QGPL
ConnectionType = 0
CommitMode = 2
ExtendedDynamic = 0
DefaultPkgLibrary = QGPL
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression = 1
LibraryView = 0
AllowUnsupportedChar = 0
ForceTranslation = 0
Trace = 0
CCSID = 1208
1 Solution
Gary PattersonVP Technology / Senior Consultant Commented:
Does /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so exist, and if so, do you have rights to it?

This may be the dependency problem noted in the installation instructions:

If the installation fails because of a dependency on libodbcinst.so, make sure you have the unixODBC driver manager installed. If the problem persists, run the installation command with the --nodeps parameter to stop dependency checking.


- Gary Patterson
Use ldd command to check the library that fails to load.
Some otherfileisnot found,and you need to add it to your LIBPATH
Try put a symbolic link from /opt/ibm/iSeriesAccess/lib to /usr/lib64 and post if there is any errors.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now