[unixODBC-support] tsql works but isql cannot connect!

Adil Lotia adil.lotia at gmail.com
Sat Oct 21 03:15:49 BST 2006

I would like to connect to a MS SQL Server 2005 from a (Ubuntu) Linux box
Python 2.4.  I probably will be getting the mxODBC library, but I have yet
get to that point!

After a few false starts and just conceptually coming to grips with what all
needed to get going, I have realized that in addition to the above
I need FreeTDS and unixODBC, which I have downloaded, built and installed.
is installed in my home directory (in case that makes a difference!)

Here is what the three configuration files look like:

alotia at gensym:~$ cat .freetds.conf
host =
port = 1423
tds version = 8.0
alotia at gensym:~$

alotia at gensym:~$ cat /etc/odbcinst.ini
Driver = /home/alotia/pkgs/freetds/lib/libtdsodbc.so
Description = v0.64 with protocol v8.0
UsageCount = 1
alotia at gensym:~$

alotia at gensym:~$ cat .odbc.ini
[ODBC Data Sources]
SQLServer2005 = Test Reporting Database

Driver      = /home/alotia/pkgs/freetds/lib/libtdsodbc.so
Description = SQL Server 2005
Database    = dmarc_reporting
Server      =
Port        = 1423
alotia at gensym:~$

Running odbcinst -j gives

alotia at gensym:~$ odbcinst  -j
unixODBC 2.2.11
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /home/alotia/.odbc.ini
alotia at gensym :~$

FreeTDS seems to be working:

alotia at gensym:~$ ~/pkgs/freetds/bin/tsql  -S SQLServer2005 -U adminservices
-P <password>
locale is

locale charset is "ISO-8859-1"
1> select * from foobar
2> go
i       j
1       2
3       4

But I cannot get isql to connect. As mentioned earlier, the end goal is to
get mxODBC
going, but I figure isql is the next step in figuring out the connection

alotia at gensym:~$  isql -v SQLServer2005 adminservices <password>
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[28000][unixODBC][FreeTDS][SQL Server]Login incorrect.
[08S01][unixODBC][FreeTDS][SQL Server]Read from SQL server failed.
[ISQL]ERROR: Could not SQLConnect
alotia at gensym:~$

One additional point: The password for this account starts with a # char. I
put single-quotes (') around the password, thinking that the shell was doing
something, but that didn't make a difference. (And, I am quoting the
the same way for tsql as well.)

Do you see any obvious problems with the config files?

I hope some kind soul can help me out on this. I have now spent 2+ days just

trying things out and Googling for solutions, and have made very little
This has been quite an exercise in frustration!

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20061020/8651b515/attachment.html>

More information about the unixODBC-support mailing list