Linux to Teradata ODBC connection- [ISQL]ERROR: Could not SQLConnect

Connectivity

Linux to Teradata ODBC connection- [ISQL]ERROR: Could not SQLConnect

Objective: I have centos (64bit) virtual machine and have installed ipython notebook on that. I am trying to connect to Teradata via ipython notebook

Where I am facing issue: After installing the Teradata Drivers, when I tried to test the isql command with verbose setting, I get the [ISQL]ERROR: Could not SQLConnect. Even though I specified –v (verbose setting), no explanation for error is printed

3. Installation Steps followed:
a. To install Jupyter Notebook:
i. sudo easy_install pip
ii. sudo yum install python-devel
iii. sudo yum install gcc-c++
iv. manually Installed scandir
v. sudo pip install jupyter

b. To install virtual environment:
i. sudo pip install virtualenv
ii. virtualenv venv

c. To install the unixODBC drivers:
i. sudo yum update (for updating the yum manager)
ii. sudo yum install unixODBC.x86_64
iii. sudo yum install unixODBC-devel.x86_64
iv. sudo yum install unixodbc-dev

d. To install Teradata Drivers
i. Manually downloaded file “tdodbc1600__linux_indep.16.00.00.03-1.tar.gz” from the Teradata download portal
ii. Gunzipped and Untarred the subfolders within this
iii. Manually installed each of the rpm files using the below command in the following order:
1. sudo rpm –ivh tdicu1600-16.00.00.01-1.noarch.rpm –nodeps
2. sudo rpm –ivh TeraGSS_linux_x64-16.00.00.05-1.noarch.rpm –nodeps
3. sudo yum install ksh
4. sudo rpm –ivh tdodbc1600-16.00.00.03-1.noarch.rpm –nodeps

e. Results from above:
i. odbcinst.ini file:
1. This was installed in the /etc/ folder
2. This was also present in the  /opt/teradata/client/ODBC_64/   location

ii. odbc.ini file:
1. This was not present in the /etc/ folder
2. This was present in the  /opt/teradata/client/ODBC_64/   location
3. I manually copied it from the above location to the /etc/ location

f. Content of the odbc.ini file at the two locations:
[ODBC] InstallDir=/opt/teradata/client/ODBC_64
Trace=0
TraceDll=/opt/teradata/client/ODBC_64/lib/odbctrac.so
TraceFile=/usr/joe/odbcusr/trace.log
TraceAutoStop=0

[ODBC Data Sources]
Teradata=tdata.so

[Teradata]
Driver=/opt/teradata/client/ODBC_64/lib/tdata.so
Description=Teradata database
DBCName=aqz.qqq.xyzzzz.com
LastUser= Username=***********
Password=************
Database= aqz.qqq.xyzzzz.com
DefaultDatabase=

g. Content of the odbcinst.ini file at the two locations:
# Example driver definitions
# Driver from the postgresql-odbc package
# Setup from the unixODBC package

[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbcw.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1

# Driver from the mysql-connector-odbc package
# Setup from the unixODBC package

 

[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1 [ODBC DRIVERS]

 

Teradata=Installed

 

[Teradata]
Driver=/opt/teradata/client/ODBC_64/lib/tdata.so
APILevel=CORE ConnectFunctions=YYY
DriverODBCVer=3.51
SQLLevel=1

h. Setting the environment variables:
i. ODBCINI=/opt/teradata/client/ODBC_64/odbc.ini ; export ODBCINI
ii. ODBCINSTINI=/opt/teradata/client/ODBC_64/odbcinst.ini; export ODBCINSTINI

i. Printing output from: odbcinst –j
 unixODBC 2.3.1
 DRIVERS............: /etc/odbcinst.ini
 SYSTEM DATA SOURCES: /etc/odbc.ini
 FILE DATA SOURCES..: /etc/ODBCDataSources
 USER DATA SOURCES..: /home/aksanand/.odbc.ini
 SQLULEN Size.......: 8
 SQLLEN Size........: 8
 SQLSETPOSIROW Size.: 8

j. Printing output from: odbcinst -q -d
[PostgreSQL]
[MySQL]
[ODBC DRIVERS]
[Teradata]

k. Printing output from: odbcinst –q –s
[ODBC]
[Teradata]

l. Testing Teradata connection:
i. isql –v Teradata
ii. Output: [ISQL]ERROR: Could not SQLConnect

4. Comments:
a. I have hit a roadblock and I am not able to debug this further

  • Could not SQLConnect
  • ISQL
  • Linux
  • odbc
  • tdicu
  • tdodbc
  • Teradata
  • TeraGSS
  • Unixodbc
1 REPLY
Teradata Employee

Re: Linux to Teradata ODBC connection- [ISQL]ERROR: Could not SQLConnect

https://community.teradata.com/t5/Blog/Python-with-Teradata-ODBC/ba-p/68181

 

It describes the different ODBC Driver Managers and that iODBC is supported on macOS, DataDirect ODBC Driver Manager is supported on Linux/Unix and Microsoft ODBC DM on Windows.