Error Using teradata client for centos 6-7 php-python-unixODBC

Database
N/A

Error Using teradata client for centos 6-7 php-python-unixODBC

Error Using teradata client for centos 6/7 php/python/unixODBC

Hello! 

 

I am new member in this forum, and I need help with teradata client system.

 

I have to tell you that my english is poor so I apologize  for my syntaxis errors.

 

I'm installing teradata using the next script, created by me, is a basic script for the installation.

 

#!/bin/bash

#S.O. Centos 6 minimal

yum groupinstall "Development tools" -y
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y

# teradata packages:
mkdir -p /usr/src/teradata
cd /usr/src/teradata
wget http://d289lrf5tw1zls.cloudfront.net/connectivity/ odbc/15.10.x.x/tdodbc__linux_indep.15.10.00.01- 1.tar.gz

tar -xzvf tdodbc__linux_indep.15.10.00.01-1.tar.gz

for i in `ls *gz`;do tar -xzvf $i;done

yum localinstall tdicu/tdicu-15.10.00.00-1.noarch.rpm -y
yum localinstall TeraGSS/TeraGSS_linux_x64-15.10.00.04-1.noarch.rpm -y
yum localinstall tdodbc/tdodbc-15.10.00.01-1.noarch.rpm -y
yum install unixODBC unixODBC-devel -y

# teradata enviroment
export CPPFLAGS="-I/opt/teradata/client/15.10/include/"
export ODBC_HOME=/opt/teradata/client/15.10/odbc_64/
export CPPFLAGS="-I/opt/teradata/client/15.10/include/"
export CUSTOM_ODBC_LIBS="-L/opt/teradata/client/15.10/lib64/ -lodbc -lodbcinst"

echo "#include <odbcinst.h>" >> /usr/include/odbc.h;
echo "#include <sql.h>" >> /usr/include/odbc.h;
echo "#include <sqlext.h>" >> /usr/include/odbc.h;
echo "/usr/local/lib" >> /etc/ld.so.conf

 

And now I’m ready for installing  php or python dev enviroment.

 

For this test,  I’m going to use isql (unixODBC binary), but first, i will create or modify odbc.ini  and odbcinst.ini files, to configure unixODBC:

 

odbc.ini =>

--------------------------

[testdsn]
Driver=/opt/teradata/client/15.10/lib64/tdata.so
Description=Teradata database
DBCName=$ip_provider
LastUser=
Username=$user_provider
Password=$pass_provider
Database=$database_provider
DefaultDatabase=
TraceFile = /var/log/tracedsn_testdsn.log
Trace=Yes

[dsntest32]
Driver=/opt/teradata/client/15.10/lib/tdata.so
Description=Teradata database
DBCName=$ip_provider
LastUser=
Username=$user_provider
Password=$pass_provider
Database=$database_provider
DefaultDatabase=
TraceFile = /var/log/tracedsn_ar32.log
Trace=Yes

--------------------------

 

odbcinst.ini =>

-------------------------------

[Teradata]
Driver=/opt/teradata/client/15.10/lib64/tdata.so
Trace=yes
TraceFile=/tmp/unixodbc.log
APILevel=CORE
ConnectFunctions=YYY
DriverODBCVer=3.51
SQLLevel=1

[TD32]
Driver=/opt/teradata/client/15.10/lib/tdata.so
Trace=yes
TraceFile=/tmp/unixodbc.log
APILevel=CORE
ConnectFunctions=YYY
DriverODBCVer=3.51
SQLLevel=1

 

Now I'll try with this configuration and it will show me an error, 

 

#> isql testdsn $user_provider $pass_provider -v

Segmentation fault

 

and now,  I'll try php with a basic script:

test.php =>

<?php

echo "Testing ODBC \n\n";
$dh = odbc_connect("testdsn",$user_provider , $pass_provider) or die(odbc_errormsg()."\n\n");
if($dh){

echo "Connection established.";

odbc_close($dh);

}
else{
echo "Connection could not be established.";
}

?>

 

Now, i’m going  to execute  test.php file

#>php test.php

Testing ODBC

Segmentation fault

 

So, I will use 32 bits configuration

 

#>isql dsntest32 -v

[01000][unixODBC][Driver Manager]Can't open lib '/opt/teradata/client/15.10/lib/tdata.so' : file not found

[ISQL]ERROR: Could not SQLConnect

 

After this, php script says the same mistake... Can't open lib '/opt/teradata/client/15.10/lib/tdata.so' : file not found And also tested with python, and errors are the same.

I’m not an expert teradata developer (this is the first time), but I used to use: oracle, mysql, mssql, mongodb, postgre, etc..,  but this has surpassed me, it is hard to me to resolve it .

 

I would be grateful if you could help me with this issue.