Connecting from Linux PHP to Teradata using ODBC

Connectivity
Fan

Connecting from Linux PHP to Teradata using ODBC

I am trying to create a db connection odbc on linux and php. I have installed unixODBC 2.3.0 and the latest Teradata utilities, TeraGSS, TDICU, and TD ODBC.

I can connect to Teradata and query and view data using the ISQL application that is part of unixODBC. However, when I use odbc_connect() in php, it will not connect.

I have traced the failed connection, and find this in the trace log:

245 TS:250: SSOLibSetMechName calling gss_get_actual_mech_name -> ret = 0 [ SingleSignOn.cpp 665 ]
246 TS:250: [SetDiagStatusRec][HY000][S1000][1][[Teradata][ODBC Teradata Driver] Unable to get ProcName for logon source] [ sqlerror.cpp 1126 ]
247 TS:250: PclConnectProcessing after InitPclMsg rc = -1 [ ConnectLogon.cpp 137 ]
248 TS:250: [SetDiagStatusRec][28000][28000][1][[Teradata][ODBC Teradata Driver] Not enough information to log on] [ sqlerror.cpp 1126 ]

These are the contents of my /usr/local/etc/odbcinst.ini file:
[ODBC]
InstallDir=/usr/local
Trace = Yes
TraceFile = /tmp/odbctrace.log

And these are the contents of my /usr/local/etc/odbc.ini file:
[ODBC Data Sources]
hsrs=tdata.so

[hsrs]
Driver=/opt/teradata/client/13.0/odbc_32/lib/tdata.so
Description=First Attempt at DSN for Dev DB
DBCName=dbc1name.dom
DBCName2=dbc2name.dom
DBCName3=dbc3name.dom
DBCName4=dbc4name.dom
DBCName5=dbc5name.dom
DBCName6=dbc6name.dom
DateTimeFormat=AAA
LastUser=
Username=
Password=
Database=HCIT_SML_REP_SOURCE
DefaultDatabase=HCIT_SML_REP_SOURCE
DSNTraceEnable=YES
DSNTraceFileMaxSize=1000000
DSNTraceOverwrite=NO
DSNTraceLineNumbers=YES
LoginTimeOut=40

Has anyone seen the error I am getting in my trace log before?

Thanks!
1 REPLY
Teradata Employee

Re: Connecting from Linux PHP to Teradata using ODBC


See the other thread

http://forums.teradata.com/forum/connectivity/teradata-odbc-driver-with-apachephp