[unixODBC-support] Installing teradata driver

Martin J. Evans martin.evans at easysoft.com
Wed Nov 7 18:39:38 GMT 2007


Vadim Kutsyy wrote:
> On Wed, 2007-11-07 at 18:06 +0000, Nick Gorham wrote:
>   
>>> I am trying to install Teradata ODBC driver and I am having some 
>>> problem.  I am running CentOS 5 and I was able to install it before, 
>>> but now I am getting an error on connection:
>>>
>>> $ isql -v TDDB <user> pass>
>>> [ISQL]ERROR: Could not SQLConnect
>>>
>>> Where would I start debugging?
>>>       
>> Maybe try using strace to see what its doing and if its failing to find 
>> any expecetd files
>>
>>     
>
> strace doesn't show that anything is missing.  But it does show that
> unixODBC is trying to access /etc/passwd, Is there a reason why unix
> ODBC needs /etc/passwd?
>
> Thanks,
>
> Vadim
>
> PS: last 20 (or so lines of strace are:
>
> open("/etc/passwd", O_RDONLY)           = 5
> fcntl(5, F_GETFD)                       = 0
> fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
> fstat(5, {st_mode=S_IFREG|0644, st_size=1680, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0x2aaaae712000
> read(5, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1680
> close(5)                                = 0
> munmap(0x2aaaae712000, 4096)            = 0
> open("/home/vkutsyy/.odbc.ini", O_WRONLY|O_CREAT|O_APPEND, 0666) = 5
> fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0x2aaaae712000
> fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
> lseek(5, 0, SEEK_SET)                   = 0
> close(5)                                = 0
> munmap(0x2aaaae712000, 4096)            = 0
> open("/home/vkutsyy/.odbc.ini", O_RDONLY) = 5
> fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0x2aaaae712000
> read(5, "", 4096)                       = 0
> close(5)                                = 0
> munmap(0x2aaaae712000, 4096)            = 0
> open("/etc/odbc.ini", O_RDONLY)         = 5
> close(5)                                = 0
> open("/etc/odbc.ini", O_RDONLY)         = 5
> fstat(5, {st_mode=S_IFREG|0644, st_size=256, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0x2aaaae712000
> read(5, "[TDDB]\nDriver          = Teradat"..., 4096) = 256
> read(5, "", 4096)                       = 0
> close(5)                                = 0
> munmap(0x2aaaae712000, 4096)            = 0
> lseek(3, 0, SEEK_SET)                   = 0
> read(3, "", 4096)                       = 0
> write(2, "[ISQL]ERROR: Could not SQLConnec"..., 34[ISQL]ERROR: Could not
> SQLConnect
> ) = 34
> semop(753667, 0x7fff88a30ed0, 2)        = 0
> semop(753667, 0x7fff88a30ed0, 1)        = 0
> shmdt(0x2aaaadfca000)                   = 0
> exit_group(1)                           = ?
>
>   
I would guess to try and find your home dir so it can locate user DSNs. 
e.g. getuid to get your user ID, then look it up with getpwuid to get 
your home directory and find any .odbc.ini files. If may be if you set 
HOMEDIR in your environment unixODBC will ignore your uid but I don't 
know for sure.

Martin




More information about the unixODBC-support mailing list