Question

I am trying to reach a remote host that is running Teradata services via ODBC. The host that I am trying to connect from is 64-bit RHEL 6.x with the following Teradata software installed:

  1. bteq
  2. fastexp
  3. fastld
  4. jmsaxsmod
  5. mload
  6. mqaxsmod
  7. npaxsmod
  8. sqlpp
  9. tdodbc
  10. tdwallet
  11. tptbase
  12. tptstream
  13. tpump

When I try to connect to the remote host via Python (interactive session), I receive a 'Unable to get catalog string' error:

[@myhost:/path/to/scripts] ->python

Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import pyodbc

>>> pyodbc.pooling = False

>>> cn = pyodbc.connect("DRIVER={Teradata}; SERVER=12.245.67.255:1025;UID=usr;PWD=pwd", ANSI = True)

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

pyodbc.Error: ('28000', '[28000] [Teradata][ODBC Teradata Driver] Unable to get catalog string. (0) (SQLDriverConnect)')

Furthermore, when I try to use isql (from the unixODBC yum package), I receive the same error

[@my_host:/path/to/scripts] ->isql -v proddsn

[28000][Teradata][ODBC Teradata Driver] Unable to get catalog string.

[ISQL]ERROR: Could not SQLConnect
Was it helpful?

Solution

I think that message means that the Teradata driver is attempting to display an error message, but it can't find the catalog file. I think you need to set an NLSPATH environment value pointing to where your tdodbc.cat file is. Something along these lines:

/opt/teradata/client/lib/odbc/%N.cat

That funky looking %N.cat is standard, you just need to point to the correct location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top