Installation guide
mxODBC - Python ODBC Database Interface
• Teradata has the tendency to return non-ordered result sets in random
order. This is due to the way the database works internally. If you need to
rely on a reproducible result set order, please add an
ORDER BY clause to
the
SELECT statements as necessary.
Example Configuration for Unix
• Setup your OS environment so that the ODBC manager can find and load
the driver (this is for the version 14.1 of the driver, your installation
directories may be different):
export LD_LIBRARY_PATH=\
/opt/teradata/client/14.10/odbc_64/lib:\
/opt/teradata/client/14.10/tdicu/lib64
export NLSPATH=/opt/teradata/client/14.10/odbc_64/msg/%N.cat
This last setting is important to make sure the driver can find its error
messages. If not set, you will get exceptions like this from the driver:
[Teradata][ODBC Teradata Driver] Unable to get catalog
string.
• Edit your ~/.odbcinst.ini file and add the Teradata driver (the location of
the driver and setup file may be different on your system):
[ODBC Drivers]
Teradata = Installed
[Teradata]
Driver=/opt/teradata/client/13.10/odbc_64/lib/tdata.so
APILevel=CORE
ConnectFunctions=YYY
DriverODBCVer=3.51
SQLLevel=1
• Edit your ~/.odbc.ini file and add a Teradata section (the location of the
driver may be different on your system). It is also necessary to point
LD_LIBRARY_PATH to the directory where the driver itself is located.
[ODBC]
Trace = 0
TraceFile = /tmp/odbc.log
[ODBC Data Sources]
teradata = Teradata
[teradata]
Driver = /opt/teradata/client/14.10/odbc_64/lib/tdata.so
Description = Teradata ODBC
DBCName = 192.168.0.250
DefaultDatabase = mydb
RunInQuietMode = Yes
DSNTraceEnable = No
DSNTraceFilePath = /tmp/teradata.txt
DSNTraceOverwrite = Yes
CharacterSet = UTF16
DateTimeFormat = AAA
# Disable preparing statements
#DisablePREPARE = Yes
# Max. response packet size in bytes
MaxRespSize = 10000000
# Disable parsing of SQL statements by the driver; do not set to
Yes
# if using .callproc() in the application.
NoScan = No
58