Installation guide
14. mx.ODBC Driver/Manager Packages
14.5.1 Notes
General Recommendations
• Please always use the DriverConnect() API to connect to the data
source if you need to pass in extra configuration information such as
names of log files, etc.
• Between unixODBC 2.3.0 and unixODBC 2.3.1, the unixODBC project
switched the library name of the ODBC manager library from
libodbc.so.1 to libodbc.so.2 to signal the change in their ABI on 64-bit
platforms (see below). This renaming affects both 32- and 64-bit versions
of unixODBC.
Since eGenix.com compiles against unixODBC 2.3.1 (or later), mxODBC
will look for a libodbc.so.2 library file and this may not be available if your
system comes with unixODBC 2.3.0. If you have unixODBC 2.3.0
installed you can safely create a symlink from the libodbc.so.1 library to
the new name libodbc.so.2 to overcome this problem. Please see the
unixODBC website for instructions.
Debugging ODBC Configurations
A common error you can see when trying to configure a database connection or
ODBC driver installation is
mx.ODBC.Error.OperationalError: ('08003',
0, '[unixODBC][Driver Manager]Connnection does not exist', 11593).
Unfortunately, this doesn't tell you much about the true cause of the problem -
only that the connection could not be established.
The reason is that unixODBC does not report the true cause of the problem as
error, but instead only issues a warning and these warnings are ignored by
mxODBC during connect, since they would prevent successful connects with
some popular drivers that regularly issues context switch warnings during
connects.
Finding the cause using an ODBC trace
If you run an ODBC trace and look at the log file, you'd see that unixODBC
reports a warning such as this during the connection attempt:
[01000][unixODBC][Driver Manager]Can't open lib
'/usr/…/libodbcdriver.so' : file not found]
For details on how to setup an ODBC trace, please have a look at section 19.1
ODBC Call Level Tracing.
Finding the cause using a custom error handler
Alternatively, you can use a custom error handler to debug such situations during
connects.
177