in reply to Re^4: DBD::ODBC to Teradata
in thread DBD::ODBC to Teradata

the 64bit complains about the 'magic' number in 2.2.11

To me that indicates the isql you are using with 2.2.11 is built 32bit.

In 2.3.0, both 32bit and 64bit cannot open tdata.so and neither refer to the magic number

I have no idea what tdata.so is. To my knowledge it is not something in unixODBC or DBD::ODBC.

my Teradata client is 13.0 and it comes with it's own libodbc.a, libodbcinst.a

But what are these archives? Are they teradata's builds of unixODBC?

The log shows SQLGetInfo failing with IM001 which is "Driver does not support this function". An ODBC driver cannot not support SQLGetInfo or how can any application find out anything about how the driver works. This would indicate some other problem and I think you are best going back to Teradata with this problem or posting to the unixodbc help mailing list as I'm told some Teradata people hang out there.

UPDATE: You can add "DisableGetFunctions = 1" to the driver entry in odbcinst.ini and that tells unixODBC to ignore SQLGetFunctions returned by the driver and just call the function. It may be Teradata here is saying it does not support SQLGetInfo when in fact it must.

UPDATE: You could also try rerunning your Perl code with PERL_DL_NONLAZY environment variable set to 1.

Replies are listed 'Best First'.
Re^6: DBD::ODBC to Teradata
by DanEllison (Scribe) on Nov 11, 2010 at 18:34 UTC

    tdata.so is the Teradata driver. I don't understand why 2.3.0 wouldn't be able to open it, when 2.2.11 is obviously using it.

    I find that the Teradata client ships with DataDirect ODBC with it. I found this document, http://web.datadirect.com/resources/odbc/perl/install-config.html, for configuring the DataDirect, but I get new errors. Still playing...

    The DisableGetFunctions didn't seem to have any effect.

Re^6: DBD::ODBC to Teradata
by DanEllison (Scribe) on Nov 12, 2010 at 14:16 UTC

    Okay! I got it going with the DataDirect ODBC that was shipped with the Teradata client. My first problem, although InstallDir pointed to a directory with my ini's and libs, it didn't have locale info which is why I wasn't getting my messages. Secondly, DataDirect apparently doesn't use the odbcinst.ini so I had to directly identify my driver in the .odbc.ini.

    After getting it to work with DataDirect, I went back to see if I could get it working with unixODBX. Under 2.2.11, tdata.so was trying to open shared objects that existed in DataDirect and don't exist in unixODBC. 2.3.0 couldn't open the tdata.so driver at all.

    To get the DBD-ODBC to compile with DataDirect, I had to make similar modifications to the Makefile.PL as were described in the document http://web.datadirect.com/resources/odbc/perl/config.html. My diff looks like:

    diff Makefile.DataDirect Makefile.PL 448,450d447 < $myodbc = 'intersolve' < if !$myodbc && -f "$odbchome/include/sqlunx.h"; < 463a461,463 > $myodbc = 'intersolve' > if !$myodbc && -f "$odbchome/include/qeodbc.h"; > 627c627 < #print {$sqlhfh} qq{#include <qeodbc.h>\n}; --- > print {$sqlhfh} qq{#include <qeodbc.h>\n}; 631,632c631 < #print {$sqlhfh} qq{#include <sql.h>\n#include <sqltypes.h +>\n#include <sqlext.h>\n}; < print {$sqlhfh} qq{#include <sql.h>\n#include <sqltypes.h> +\n#include <sqlext.h>\n#include <sqlucode.h>\n}; --- > print {$sqlhfh} qq{#include <sql.h>\n#include <sqltypes.h> +\n#include <sqlext.h>\n};

    The Teradata client install builds a link /usr/odbc for ODBCHOME, but it didn't include includes or odbc_config so I found it better to set ODBCHOME directly to /opt/teradata/client/13.0/odbc_32 for building. InstallDir could still point to link /usr/odbc.

      Okay, I'm back...

      We've moved from the 32bit AIX environment to a 64bit Linux environment. I've followed my prescription from my previous troubles with no joy. DBD::ODBC compiles, but make test hangs in 05meth. If I install anyway and run, I get a Memory Fault.

      When I compiled, there are plenty of warnings of unused variables and differing signedness which makes me uneasy.

        I get no warnings compiling here on Linux with unixODBC header files. The compilation warnings can depend on what ODBC header files you use - not all ODBC driver managers are the same. Please post your ODBC driver manager name and the warnings.

        If it hangs in 05meth then do prove -vb t/05meth.t and post it. Even better, set DBI_TRACE=15=x.log and export it, then run prove and post the output. If you don't want to do that here then rt it and I'll look at it.

        However, I have not got Teradata and if you are using a commercial ODBC driver manager or ODBC driver I may only be able to offer limited help.