[unixODBC-support] Can connect using tsql but not isql

Bilal Hasan mithrazor at gmail.com
Sat Jan 9 00:08:46 GMT 2016

I'm having an issue where I can connect to tsql but not through isql and
DBD:ODBC which is my end goal. With DBD:ODBC it doesn't complain about not
being able to connect. But I don't receive any data.

 I connect to tsql using:

tsql -S MyDB-U MyUser

But when I try to connect specifying the password in the command
ie: tsql -S MyDB -U MyUser -P MyPass

It gives me the following error:

locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Msg 18456 (severity 14, state 1) from ELEONIE-VM4\SCMSERVER Line 1:
"Login failed for user 'MyUser'."
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server

Now, when I try to connect using isql, I get a plain old data source not
found error:

[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[37000][unixODBC][FreeTDS][SQL Server]Login failed for user 'RNDCIQReader'.
[ISQL]ERROR: Could not SQLConnect

Below is my odbc.ini:

Driver = FreeTDS
Servername = MyDB
Port = 1433
TDS Version = 8
Thread safety: yes
Database = MyDB
UID = MyUser
PWD = MyPass

Below is my freetds.conf:

#   $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".

# Global settings are overridden by those in a database
# server specific section
        # TDS protocol version
; tds version = 4.2

# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff

# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512

# A typical Sybase server
host = symachine.domain.com
port = 5000
tds version = 5.0

# A typical Microsoft server
host = ntmachine.domain.com
port = 1433
tds version = 7.0

host = ***.**.**.***
port = 1433
tds version = 8

And below is my odbcinst.ini file:

# Example driver definitions

# Driver from the postgresql-odbc package
# Setup from the unixODBC package
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1

# Driver from the mysql-connector-odbc package
# Setup from the unixODBC package
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

Description = ODBC for Microsoft SQL
Setup      = /usr/lib/libtdsS.so
Driver      = /usr/lib/libtdsodbc.so.0
Driver64 = /usr/lib64/libtdsodbc.so.0
Setup64 = /usr/lib64/libtdsS.so
UsageCount  = 1
Threading   = 2

I've been looking for a way to fix this for a couple days now. Please help!
Any information would be appreciated
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20160108/cbebe2f5/attachment.html>

More information about the unixODBC-support mailing list