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

Antonio Escobar AESCOBAR at businessobjects.com
Mon Oct 23 13:09:25 BST 2006

You could try using :


$ isql DSN user password -v


This try the odbc driver


If this work 


You could try using :




This try the odbc manager, you have to make sure the odbc.ini could be
reach by odbctest.sh and the DSN and password they are setting.


If both work, you are done 


Antonio Escobar

Technical Support Engineer
Latin American Team
Business Objects Americas
400 International Pkwy. Ste 200
Lake Mary, FL. 32746. USA.

Phone (407) 804-5715

antonio.escobar at businessobjects.com


From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Adil Lotia
Sent: Friday, October 20, 2006 10:16 PM
To: unixodbc-support at easysoft.com
Subject: [unixODBC-support] tsql works but isql cannot connect!


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

After a few false starts and just conceptually coming to grips with what
all I 
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. FreeTDS
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 have 
put single-quotes (') around the password, thinking that the shell was
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
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/20061023/c7caa06b/attachment.html>

More information about the unixODBC-support mailing list