4. FreeTDS

From the FreeTDS website, www.freetds.org:

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.

Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular DataStream) protocol used by these databases for their own clients. It supports many different flavors of the protocol and supports several APIs to access it. Additionally FreeTDS works with other software such as Perl and PHP, providing access from those languages as well. There is also a native (type 4) JDBC driver available for platform-independent Java clients (including Java Server Pages applications), with support for most of the JDBC 1 API and portions of the JDBC 2 API.

4.1. Installation

Grab the latest stable release of the source code from the website, e.g., freetds-stable.tgz (at the time of writing v0.62.1). From the README:

FreeTDS detects the presence of ODBC headers on your system, and compiles the ODBC driver if found.
So you'll want your ODBC development kit (e.g., UnixODBC), including header filesunixODBC, (so that's unixODBC and unixODBC-devel, if you're using RedHat), ready-installed at this point.

Then,

    ./configure --with-tdsver=8.0
    make
    make install
which sticks everything in /usr/local.

4.2. Configuration and Testing

FreeTDS comes with a gizmo called tsql (installed in /usr/local/bin) for testing purposes. Try it like this:

    prompt> tsql -H vardy.csu.umist.ac.uk -p 1433 -U <ursusername> -P <urspassword>
    1>quit
    prompt>
or, better:
    prompt> tsql -H vardy.csu.umist.ac.uk -p 1433 -U <ursusername> 
    Password:
    1>quit
    prompt>

If the above works, then add this

  # -- simonh's first go for vardy, based on "A typical Microsoft SQL Server 
  #    2000 configuration", from below :

  [vardyurs]
          host = vardy.csu.umist.ac.uk
          port = 1433
          tds version = 8.0
to /usr/local/etc/freetds.conf (after the "global" section). Then this
    prompt> tsql -S vardywardy -U <ursusername> -P <urspassword>
or, better, this
    prompt> tsql -S vardywardy -U <ursusername> 
    Password:
    1>
    prompt> 
should work too.

...previousup (conts)next...



About this document:

Produced from the SGML: /home/isd/public_html/_sql_server_odbc_py/_reml_grp/index.reml
On: 19/3/2004 at 15:34:33
Options: reml2 -i noindex -l long -o html -p multiple