http://www.perlmonks.org?node_id=874939


in reply to Error connecting to Teradata via ODBC

Have you tested your connection for DSN=odbc_entry in Data Sources (ODBC)?

  • Comment on Re: Error connecting to Teradata via ODBC

Replies are listed 'Best First'.
Re^2: Error connecting to Teradata via ODBC
by MoFiddy (Sexton) on Dec 02, 2010 at 18:04 UTC
    Hi Generoso, That is a good question. Our server is Solaris, so I poked around and found /opt/teradata/client/odbc64/samples/C. I ran the adhoc program, but discovered that the file that I am referencing in my code ($ENV{'ODBCINI'} = '/path/to/.odbc.ini';) is NOT the same odbc.ini file that /opt/teradata/client/odbc64/samples/C references. It seems that I need to add my dsn entry to /opt/teradata/client/odbc64/odbc.ini for it to work. Do I also need to add it to odbcinst.ini too? Is that correct? Am I on the right track? Thanks Edit: Added sentence about odbcinst.ini.
      It turns out that the problem was that I was using 64-bit odbc drivers. Our version of Perl only supports 32-bit at this time. I changed the odbc entry to point to the 32-bit drivers and I was able to connect. Thanks for your help! Dennis