[freetds] unixODBC/MS SQL/freetds problem

Lyons, Andrew Myers andrew.m.lyons at vanderbilt.edu
Thu Jun 17 16:08:39 EDT 2004


after some tinkering I am now able to access my database through 
command-line isql and the ODBHC Data Manager.  Thank you so much!
I suppose my biggest problem was that I didn't understand how 
freetds.conf and odbc.ini interacted with the ODBCConfig utility. 
I suppose as far as the user guide goes, I personally could have 
benefited greatly from more unixODBC-specific instructions.  If I 
feel that I have sufficient understanding of freetds/unixODBC when 
I'm done, I would be more than happy to make a tutorial.

I now have a problem when trying to connect using python with 
mxODBC.  I don't get any log data when I try this method; here's 
what happens:

>>> import mx.ODBC.unixODBC
>>> db = 

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
mxODBC.OperationalError: ('IM002', 0, '[unixODBC][Driver 
Manager]Data source name not found, and no default driver 
specified', 6044)

I realize this may not be a freeTDS problem, but if anyone could 
provide assistance I would greatly appreciate it.

One side note:
When I do an isql from the command line, I get the following text 
as part of the log output:

14:26:44.199938 tds_put_string converting 6 bytes of "SYBASE"
14:26:44.199972 tds_put_string wrote 12 bytes
14:26:44.200001 tds_put_string wrote 0 bytes
14:26:44.200029 tds_put_string converting 10 bytes of "us_english"
14:26:44.200080 tds_put_string wrote 20 bytes
14:26:44.200109 tds_put_string converting 9 bytes of "SIMONPHYS"
14:26:44.200143 tds_put_string wrote 18 bytes

Should I be concerned that "sybase" is still showing up there? 
even though it seems to work?

I greatly appreciate the time you spent to develop and support 
freetds, which I'm sure will be quite useful to me once I figure 
out how it works  :-)



--On Thursday, June 17, 2004 9:18 AM -0400 "Lowden, James K" 
<LowdenJK at bernstein.com> wrote:

>> From: Lyons, Andrew Myers
>> Sent: June 16, 2004 6:15 PM
>> I am able to connect, do queries etc using tsql:
>> tsql -SSIMONDEVEL -U[username] -P[password]
> ...
>> But when I try to use isql, or the unixODBC DataManager, or
>> mxODBC  etc. I get the following error:
>> isql -v SIMONDEVEL [username]
>> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data
>> source [ISQL]ERROR: Could not SQLConnect
> ...
>> TDSDUMPCONFIG gives me the following information when i try to
>> make  a connection using any of those 3 ways:
>> Starting log file for FreeTDS 0.62.4
> ...
>> 15:00:35.328471 Server SYBASE not found!
> Welcome, Andrew.
> "Server SYBASE not found" is our classic (albeit obscure) message
> indicating that FreeTDS failed to locate the server by the name
> you indicated.
> Your odbc.ini uses "Server", the value of which is the DNS name
> (or ip address) of the machine hosting the database.  That's an
> ODBC-only setup, meaning the FreeTDS ODBC driver won't consult
> freetds.conf.  You must fully describe the server in odbc.ini.
> You're missing port and TDS version.
> Alternatively, use "Servername = SIMONDEVEL" instead.
> You clearly studied the UG, and you're not the first person to
> get tripped up by this.  If you can suggest some way to make them
> clearer, please do.
> Regards,
> --jkl
>> my freetds.conf file:
>> [global]
>> 	tds version = 8.0
>> 	host =
>> 	port = 1433
>> 	tds version = 8.0
>> my odbc.ini file:
>> Driver          = TDS
>> Description     = SIMON development server MS SQL 2000
>> Trace           = No
>> Server      	=
>> Database        = SIMONPHYS
>> my odbcinst.ini file:
>> [TDS]
>> Description		= v0.62 TDS version 8.0
>> Driver		= /usr/local/lib/libtdsodbc.so
>> Setup		= /usr/local/lib/libtdsS.so
>> FileUsage		= 1
>> all three are located in /usr/local/etc/, which is where the
>> environment
>> variable FREETDS points to.
>> all the information in ODBCConfig seems to be correct as well.
>> I would greatly appreciate any help anyone could offer for my
>> problem.
>> ---------------------------------------
>> Lyons, Andrew Myers
>> Vanderbilt University
>> Email: andrew.m.lyons at Vanderbilt.Edu

More information about the FreeTDS mailing list