0

After installing unixODBC and the Netezza drivers on a Linux client and configuring ~/.odbcinst.ini and ~/.odbc.ini data sources according to the documentation, attempting to connect to a Netezza PureData warehouse via some tools may yield an error similar to:

(Error) ('HY000', '[HY000] [unixODBC]Error occurred while loading translation library (45) (SQLDriverConnect)')

For example, this was output by the Python SQLAlchemy library via a DBAPI connection on a RHEL7 box (though has been reported from other distributions and other tools).

Does anyone know the detail of what is happening and how to properly resolve it?

DavidJ
  • 4,369
  • 4
  • 26
  • 42

4 Answers4

2

Extra info: I had a similar issue with the exact same error message.

Turns out I had /etc/odbcinst.ini set up with UnicodeTranslationOption=utf8 for the [NetezzaSQL] driver.

Also a wrong (32-bit) driver was used.

Fixed with /etc/odbcinst.ini:

[NetezzaSQL]
Driver          = /opt/netezza/lib64/libnzodbc.so
DebugLogging    = true
LogPath         = /tmp
Trace           = 0
TraceAutoStop   = 0
TraceFile       = /tmp/trace.log
UsageCount      = 1
1

One way to work-around the issue, is to add the following lines to the specific data-source section of your ~/.odbc.ini file:

TranslationDLL=
TranslationName=
TranslationOption=

I don't know what other implications doing that may have (for example on non-English error messages or using unusual character encodings).

DavidJ
  • 4,369
  • 4
  • 26
  • 42
1

Set the UnicodeTranslationOption to be UTF16 instead of UTF8 in your odbc.ini. Make sure that it has that setting in both the odbc.ini recognized by 'odbcinst -j' and also a spare copy in your home directory called just 'odbc.ini'. The latest netezza files seems to read the configuration without being a hidden file '.odbc.ini'

0

You can also enable Netezza ODBC debug log to figure out detailed error. In odbcinst.ini , set DebugLogging = true

C.C. Hsu
  • 169
  • 2