Installation guide
14. mx.ODBC Driver/Manager Packages
Threading
• In unixODBC versions 2.3.0 and below, the ODBC manager used a little
known odbc.ini setting called "Threading" which determined the default
thread level protection of the ODBC data source.
• The default used to be lock level 3 (the ODBC driver does not allow
multiple threads to use it and everything is serialized). This could result in
the application using mxODBC and unixODBC to hang during long
running queries. Fixing this was easy, but not well documented in
unixODBC. Setting the thread lock level to 0 (driver is fully thread safe)
allowed the application to run other queries in parallel, e.g.
[PostgreSQL]
Description = PostgreSQL driver for Linux & Win32
Driver = /usr/local/lib/libodbcpsql.so
Setup = /usr/local/lib/libodbcpsqlS.so
Threading = 0
• Starting with unixODBC 2.3.1, the default thread lock level now is 0, so
the above is no longer necessary.
• These are the available thread lock levels (from unixODBC's __handle.c):
Level 0 - Only the DM internal structures are protected
the driver is assumed to take care of it's self
Level 1 - The driver is protected down to the statement level
each statement will be protected, and the same for the connect
level for connect functions, note that descriptors are considered
equal to statements when it comes to thread protection.
Level 2 - The driver is protected at the connection level. only
one thread can be in a particular driver at one time
Level 3 - The driver is protected at the env level, only one thing
at a time.
By default the driver open connections with a lock level of 3,
this can be changed by adding the line
Threading = N
to the driver entry in odbcinst.ini, where N is the locking level
(0-3)
14.6 mx.ODBC.DataDirect -- DataDirect ODBC
Manager
Tested with DataDirect ODBC Manager 7.1
DataDirect is a proprietary ODBC manager for Unix developed by DataDirect. It is
used by a number of ODBC drivers available for Unix platforms.
179