Teradata 15 ODBC Error " No DBCName entries were found in DSN/connection-string " in Linux Server

Connectivity
Teradata Employee

Teradata 15 ODBC Error " No DBCName entries were found in DSN/connection-string " in Linux Server

Hi Team,

 

I am encountering a very strange error in our Linux machine. We installed Teradata ODBC driver 15.10 and are able to successfully test the connection using tdxodbc, like -

  

## Note: odbc.ini file below is a direct copy of the default odbc.ini template file
> unset ODBCINI > unset ODBCINST > unset LD_LIBRARY_PATH > export ODBCINI=/home/myuser/odbc.ini > export LD_LIBRARY_PATH=/opt/teradata/client/15.10/lib64/ > /opt/teradata/client/15.10/bin/tdxodbc64 -C "DRIVER=Teradata; DBCNAME=192.168.0.1; UID=myuser; PWD=mypassword;" Connecting with SQLDriverConnect("DRIVER=Teradata; DBCNAME=192.168.0.1; UID=myuser; PWD=*;")... .....ODBC connection successful. ODBC version = -03.52.0000- DBMS name = -Teradata- DBMS version = -15.00.0612 15.00.06.12- Driver name = -tdata.so- Driver version = -15.10.01.06- Driver ODBC version = -03.51- (type quit to terminate adhoc) Enter SQL string :

However my custom entry in the odbc.ini file isn't being correctly read. For instance having the following DSN entry in the same file,

[myproddb]
Driver=/opt/teradata/client/15.10/odbc_64/lib/tdata.so
Description=Teradata database
DBCName=192.168.0.1
LastUser=
Username=
Password=
Database=
DefaultDatabase=
DSNTraceEnable=YES
DSNTraceFilePath=/home/myuser/trace.log
DSNTraceFileMaxSize=1000000
DSNTraceOverwrite=NO
DSNTraceLineNumbers=YES

and running the same steps will result in the following - 

> unset ODBCINI
> unset ODBCINST
> unset LD_LIBRARY_PATH
> export ODBCINI=/home/myuser/odbc.ini
> export LD_LIBRARY_PATH=/opt/teradata/client/15.10/lib64/
> /opt/teradata/client/15.10/bin/tdxodbc64 -d myproddb

Enter UserID: myuser
Enter Password: ****

Connecting with SQLConnect(DSN=myproddb,UID=myuser,PWD=*)...

adhoc: (SQL Diagnostics) STATE=08001, CODE=0, MSG=[Teradata][ODBC Teradata Driver] No DBCName entries were found in DSN/connection-string.
ODBC connection closed

> 

I enabled the tracing and this was the output - 

Teradata ODBC Driver Release 15.10.01.06 Trace File:  Enabled at Tue Nov 14 15:43:51 2017
Driver Manager version 07.16.0253 (U0228)

Tracing enabled for connection number 2 to myproddb
     1   2 TS:0:[140271041320736] Enter SQLConnect(hdbc=2)   [ connect.cpp 3883 ]
     2   2 TS:0:[140271041320736] ...DSN="myproddb", cbDSN=8   [ connect.cpp 3886 ]
     3   2 TS:0:[140271041320736] Tracing Disabled for this connection
     4     TS:0:[140271041320736]  m_use2xAppCustomCatalogMode = 0    [ connect.cpp 2118 ]
     5     TS:0:[140271041320736]  m_retryOnEINTR = 1    [ connect.cpp 2134 ]
     6     TS:0:[140271041320736]  m_useDateForTSParams = 0    [ connect.cpp 2221 ]
     7     TS:0:[140271041320736]  m_dontCreateParamsforTS = 0    [ connect.cpp 2236 ]
     8     TS:0:[140271041320736]  m_maxCharSize32K = 0    [ connect.cpp 2251 ]
     9     TS:0:[140271041320736]  m_dontUseHelpDatabase = 0    [ connect.cpp 1371 ]
    10     TS:0:[140271041320736]  m_ignoreSearchPattern = 0    [ connect.cpp 1385 ]
    11     TS:0:[140271041320736] "myuser",    [ connect.cpp 3904 ]
    12     TS:0:[140271041320736] Before calls to Init() and Logon() -- Authentication mechanism="", boolean=0, enum=0   [ connect.cpp 3969 ]
    13     TS:0:[140271041320736] Before calls to Init() and Logon() -- Username="myuser"   [ connect.cpp 3971 ]
    14     TS:0:[140271041320736] ... TDSessionState changing from 0 to 0   [ cdbc.cpp 3364 ]
    15     TS:0:[140271041320736] [SetDiagStatusRec][08001][08001][1][[Teradata][ODBC Teradata Driver] No DBCName entries were found in DSN/connection-string. ]    [ sqlerror.cpp 1297 ]
    16     TS:0:[140271041320736] SQLGetDiagRec(fHandleType 2, hHandle 2, iRecNumber 1,    [ results.cpp 4153 ]
    17     TS:0:[140271041320736] szSqlState, pfNativeErrorPtr, szMessageText, 2052, pcbTextLengthPtr)
    [ results.cpp 4218 ]
    18     TS:0:[140271041320736] SQLGetDiagRec returns 0   [ results.cpp 4234 ]
    19     TS:0:[140271041320736] SQLGetDiagRecW SQLGetDiagRec2 returned 0   [ SQLWFunctions.cpp 1376 ]
    20     TS:0:[140271041320736] SQLGetDiagRecW returns  0 to the DM   [ SQLWFunctions.cpp 1392 ]
    21     TS:0:[140271041320736] SQLGetDiagRec(fHandleType 2, hHandle 2, iRecNumber 1,    [ results.cpp 4153 ]
    22     TS:0:[140271041320736] szSqlState, pfNativeErrorPtr, szMessageText, 2052, pcbTextLengthPtr)
    [ results.cpp 4218 ]
    23     TS:0:[140271041320736] SQLGetDiagRec returns 0   [ results.cpp 4234 ]
    24     TS:0:[140271041320736] SQLGetDiagRecW SQLGetDiagRec2 returned 0   [ SQLWFunctions.cpp 1376 ]
    25     TS:0:[140271041320736] SQLGetDiagRecW returns  0 to the DM   [ SQLWFunctions.cpp 1392 ]
    26     TS:0:[140271041320736] SQLGetDiagField(fHandleType 2, hHandle 2, iRecNumber 1, fDiagIdentifier 8,    [ results.cpp 3349 ]
    27     TS:0:[140271041320736] pvDiagInfoPtr, 1026, pcbStringLengthPtr)
    [ results.cpp 3623 ]
    28     TS:0:[140271041320736] SQLGetDiagField(fHandleType 2, hHandle 2, iRecNumber 1, fDiagIdentifier 9,    [ results.cpp 3349 ]
    29     TS:0:[140271041320736] pvDiagInfoPtr, 1026, pcbStringLengthPtr)
    [ results.cpp 3623 ]
    30     TS:0:[140271041320736] SQLGetDiagField(fHandleType 2, hHandle 2, iRecNumber 1, fDiagIdentifier 10,    [ results.cpp 3349 ]
    31     TS:0:[140271041320736] PriorToV2R2OrDefault 0, 1026, 22) --> SQL_SUCCESS
    [ results.cpp 3555 ]
    32     TS:0:[140271041320736] SQLGetDiagField(fHandleType 2, hHandle 2, iRecNumber 1, fDiagIdentifier 11,    [ results.cpp 3349 ]
    33     TS:0:[140271041320736] , 1026, 0) --> SQL_SUCCESS
    [ results.cpp 3598 ]
    34     TS:0:[140271041320736] SQLGetDiagRec(fHandleType 2, hHandle 2, iRecNumber 2,    [ results.cpp 4153 ]
    35     TS:0:[140271041320736] szSqlState, pfNativeErrorPtr, szMessageText, 2052, pcbTextLengthPtr)
    [ results.cpp 4218 ]
    36     TS:0:[140271041320736] SQLGetDiagRec returns 100   [ results.cpp 4234 ]
    37     TS:0:[140271041320736] SQLGetDiagRecW SQLGetDiagRec2 returned 100   [ SQLWFunctions.cpp 1376 ]
    38     TS:0:[140271041320736] SQLGetDiagRecW returns  100 to the DM   [ SQLWFunctions.cpp 1392 ]
    39     TS:0:[140271041320736] Entering SQLFreeHandle     [ connect.cpp 805 ]
    40     TS:0:[140271041320736] SQLFreeHandle: SQL_HANDLE_DBC    [ connect.cpp 813 ]
    41     TS:0:[140271041320736] FreeConnect(hdbc2)    [ connect.cpp 6252 ]
    42     TS:0:[140271041320736] ...Message texts file closed   [ cdbc.cpp 1154 ]
    43     TS:0:[140271041320736] ...AddressOfEntryPoint failed for DestroyAllShellWidgets due to NULL so_handle   [ ../unix/csharedobj.cpp 359 ]
    44     TS:0:[140271041320736] CSharedObject being destroyed   [ ../unix/csharedobj.cpp 120 ]
    45     TS:0:[140271041320736] : successful   [ ../unix/csharedobj.cpp 136 ]
    46     TS:0:[140271041320736] ...Connection dialog shared object released   [ cdbc.cpp 1174 ]
    47     TS:0:[140271041320736] CToTeradataLanMessage::operator delete (p=0x544920)   [ ctlanmsg.cpp 523 ]
    48     TS:0:[140271041320736] doing delete on CFromTeradataLanMessage   [ ctlanmsg.cpp 853 ]
    49     TS:0:[140271041320736] Entering SQLFreeHandle     [ connect.cpp 805 ]
    50     TS:0:[140271041320736] SQLFreeHandle: SQL_HANDLE_ENV    [ connect.cpp 809 ]
    51     TS:0:[140271041320736] FreeEnv(henv2)    [ connect.cpp 6322 ]

**** Tracing Disabled at Tue Nov 14 15:43:51 2017 ***

Has anyone encountered this before?

 

Thanks.

 

Regards,

 

Ian