[unixODBC-support] RE: Problems with freetds and unixodbc

Brian Morton bmorton at secureworks.com
Thu Dec 8 16:27:29 GMT 2005

I think this pretty much covers it.  This is more up to date than the one on
the site, which is from FreeTDS version .52 (.63 is latest).

-----Original Message-----
From: Stefan Radman [mailto:Stefan.Radman at ctbto.org] 
Sent: Wednesday, December 07, 2005 11:34 AM
To: Support for the unixODBC project
Subject: RE: [unixODBC-support] RE: Problems with freetds and unixodbc

Hi Brian,

Thanks for volunteering to write the HOWTO.
Below you'll find a summary of my findings.
Use it and distill it as you like ;-)


The ODBC-only configuration does not need any FreeTDS configuration files or
environment variables.
It lives and works solely from the configuration found in odbc.ini and

Here is a sample configuration that worked very well for me on Solaris and
Linux with unixODBC 2.2.9 and FreeTDS ODBC driver 0.62.3:

FreeTDS driver entry in odbcinst.ini:
Description=FreeTDS ODBC Driver for Sybase and MS-SQL
Driver=/usr/lib/libtdsodbc.so Setup=/usr/lib/libtdsodbc.so

DSN entry in odbc.ini:
Description     = Test Sybase Database with FreeTDS
Driver          = FreeTDS
Server          = sybase.example.com
Port            = 5050
TDS_Version     = 5.0
Database        = testdb

unixODBC has two handy tools for adding these entries:
  1) the "ODBCConfig" GUI and
  2) the "odbcinst" command line tool 
     for non-interactive processing (e.g. odbcinst -i -d -r)

Valid attributes for use in odbc.ini (or the connection string) can be found

For ODBC-only configurations these are:

  Server       database server DNS hostname or IP address
  Port         TCP port the database server is listening
  Database     databse name on the server

* do NOT use "Servername" in an ODBC-only configuration!
* use of "Server" should be preferred over "Address"
  (see http://lists.ibiblio.org/pipermail/freetds/2004q2/016086.html et

A summary of the Q&A regarding "Server","Servername" and "Address" would
help people a great deal.

What I haven't found is a comprehensive reference about the default TCP port
numbers that different versions of Microsoft and Sybase SQL Server

    ms-sql-s        1433/tcp   Microsoft-SQL-Server 
    sybase-sqlany   1498/tcp    Sybase SQL Any

    4100 Sybase ASE SQL Server default
    2025 old Sybase ASE SQL Server default??

> -----Original Message-----
> From: unixodbc-support-bounces at easysoft.com
> [mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Brian 
> Morton
> Sent: Wednesday, 07 December, 2005 15:26
> To: 'unixodbc-support at easysoft.com'
> Subject: [unixODBC-support] RE: Problems with freetds and unixodbc
> I read the FreeTDS article I was sent about the three possible 
> configuration options for FreeTDS and ODBC.  Can anyone shed some 
> light on tips for the only ODBC method?  I have done pure FreeTDS, and 
> also done the config file mix, which is the one documented on 
> unixODBC's site.  How do I do it with ODBC being the only connection 
> method?  Once I figure it out, I will write a howto for the site.
> >  -----Original Message-----
> > From: 	Brian Morton  
> > Sent:	Tuesday, December 06, 2005 10:59 AM
> > To:	'unixodbc-support at easysoft.com'
> > Subject:	Problems with freetds and unixodbc
> > 
> > I have a Debian 3.1 machine with FreeTDS and unixODBC
> installed.  I am
> > able to connect to my MSSQL 2000 server via tsql (which is
> the command
> > line interface for FreeTDS).  However, I cannot connect via
> isql or any
> > odbc connect functions in PHP.  I have read the HOWTO on this on the 
> > unixODBC site, but it has not helped me.  Where can I begin to 
> > troubleshoot my problems between FreeTDS and unixODBC?
> Thanks for your
> > help in advance.
> > 
> > Brian Morton
> > 
> > CRM Developer
> > SecureWorks, Inc.
> > 11 Executive Park Drive
> > Atlanta, GA 30329
> > tel  (404) 417-3728
> > fax (404) 327-8835
> > www.secureworks.com
> > 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support

unixODBC-support mailing list
unixODBC-support at easysoft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20051208/c86f064a/attachment.html>

More information about the unixODBC-support mailing list