I can successfully connect to DB2 using my odbc files. But when I try it with Teradata I get the following error:
$ /opt/teradata/client/13.10/odbc_64/samples/C/adhoc
/opt/teradata/client/13.10/odbc_64/samples/C/adhoc: /usr/lib64/libodbc.so: no version information available (required by /opt/teradata/client/13.10/odb c_64/samples/C/adhoc)
Enter Data Source Name: TDProd
Enter UserID: <username>
Enter Password: *****
Connecting with SQLConnect(DSN=TDProd,UID=walkera,PWD=*)...
adhoc: SQLError() couldn't find text, RC=100
ODBC connection closed.
In my odbc.ini file I have the following entries:
[ODBC]
InstallDir=/opt/teradata/client/13.10/odbc_64
Trace=0
TraceDll=/opt/teradata/client/13.10/odbc_64/lib/odbctrac.so
TraceFile=/usr/joe/odbcusr/trace.log
TraceAutoStop=0
[ODBC Data Sources]
testdsn=tdata.so
[testdsn]
Driver=/opt/teradata/client/13.10/odbc_64/lib/tdata.so
Description=Teradata running Teradata V1R5.2
DBCName=*******
LastUser=
Username=
Password=
Database=
DefaultDatabase=
And in my odbcinst.ini file I have this entry for Teradata:
[ODBC DRIVERS]
Teradata=Installed
# Example driver definitions
# Driver for Teradata
[Teradata]
Driver=/opt/teradata/client/13.10/odbc_64/lib/tdata.so
APILevel=CORE
ConnectFunctions=YYY
DriverODBCVer=3.51
SQLLevel=1
Any idea what I'm doing wrong here? BTEQ works fine
BTEQ 13.10.00.06 Tue Jul 28 17:12:52 2015
+---------+---------+---------+---------+---------+---------+---------+----
.RUN FILE /home/<username>/TDlogin;
+---------+---------+---------+---------+---------+---------+---------+----
.logmech ldap
+---------+---------+---------+---------+---------+---------+---------+----
.LOGON ****/<username>,
*** Logon successfully completed.
*** Teradata Database Release is 14.00.04.09
*** Teradata Database Version is 14.00.04.09
*** Transaction Semantics are BTET.
*** Session Character Set Name is 'ASCII'.
*** Total elapsed time was 1 second.
+---------+---------+---------+---------+---------+---------+---------+----
*** Warning: EOF on INPUT stream.
+---------+---------+---------+---------+---------+---------+---------+----
.EXPORT DATA FILE=/home/<username>/output;
*** To reset export, type .EXPORT RESET
+---------+---------+---------+---------+---------+---------+---------+----
.set RECORDMODE OFF;
+---------+---------+---------+---------+---------+---------+---------+----
.set separator ","
+---------+---------+---------+---------+---------+---------+---------+----
.set heading '';
+---------+---------+---------+---------+---------+---------+---------+----
.set footing '';
+---------+---------+---------+---------+---------+---------+---------+----
.set titledashes off;
+---------+---------+---------+---------+---------+---------+---------+----
.set quiet on;
*** Type QUIET OFF; to resume output.
+---------+---------+---------+---------+---------+---------+---------+----
HELP COLUMN ESA_VIEWS.VDDA_FACT.*;
*** Total elapsed time was 2 seconds.
+---------+---------+---------+---------+---------+---------+---------+----
.EXPORT RESET
*** Output returned to console.
+---------+---------+---------+---------+---------+---------+---------+----
.LOGOFF
*** You are now logged off from the DBC.
+---------+---------+---------+---------+---------+---------+---------+----
.EXIT
*** Exiting BTEQ...
*** RC (return code) = 0