[unixODBC-dev] An issue while connecting to the MS SQL Server

Joseph boshra joseph.boshra.mina at gmail.com
Wed Oct 5 12:07:06 BST 2016

Hello Brain

I'm Joseph a developer

I have a project where I need to connect to the MS SQL from Linux so after
searching I found that I need to install
1- unixODBC
2- unixODBC
3- freetds-dev
4- freetds-bin
5- freetds-common
6- tdsodbc

and here is my configuration


Description = ODBC for MSSQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1
Fileusage = 1
Threading = 2


Description  = MSSQL Database
Driver = FreeTDSDatabase = asterisk
Server =
Username = sa
Password = iti
Trace = no
TDS_Version = 8.0
Port = 1433

when I use this statement

echo "select 1" | isql -v MSSQL

I got

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

but when I used this echo "select 1" | isql -v MSSQL sa iti it worked

I also Modified Freetds.conf


Server =
TDS_Version = 8.0
Port = 1433

the question  is, why isql failed to connect to SQL Server and was not
able to read the user name and password from the odbc.ini file ? and
what is the solution for this problem ?

Thanks in advance

Best Regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20161005/818d544f/attachment-0001.html>

More information about the unixODBC-dev mailing list