Installation guide

mxODBC - Python ODBC Database Interface
Driver Notes
eGenix.com has had reports about memory leaks occurring with the
Oracle driver when used in long running applications. mxODBC itself
does not have any known memory leaks and there are no problems with
other available drivers for Oracle.
Oracle regards empty strings as NULL values. As a result inserting an
empty string into a VARCHAR column can result in the Oracle driver
returning NULL for that column when fetching data.
The Oracle driver returns numeric values as floats, even integers, so
unless you use a converter function, you will get floats when querying
integer columns.
The automatic reuse of prepared SQL commands does not work with the
Oracle driver, so the optimization for the
cursor.execute() method
does not work with the Oracle driver.
The Oracle driver does not support scrollable cursors, meaning that
cursor.scroll() will only work using the built-in mxODBC emulation
for forward scrolling.
Example Configuration for Unix
To be able to use the Oracle Instant Client, you have to create a
~/.tnsnames.ora file providing the network configuration details of the
target database:
ORACLE11GR2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)
(HOST = oracle11gr2.example.net)
(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle11gr2.example.net)
)
)
Add an Oracle driver section to the ~/.odbcinst.ini file (the location of the
driver file may be different on your system):
[ODBC Drivers]
OracleInstantClient = Installed
[OracleInstantClient]
Description = Oracle 11g ODBC Driver
Driver = /opt/oracle/instantclient_11_2/libsqora.so.11.1
Setup =
FileUsage =
CPTimeout =
CPReuse =
Edit the ~/.odbc.ini file based on the above ~/.tnsnames.ora settings.
Note that the location of the driver file depends on your installation. It is
also necessary to point LD_LIBRARY_PATH to the directory where the
driver itself is located.
[oracle11gr2]
44