FAQ
Status
Download
TDS Gateway
Contact
Home

FAQ
1. General Questions
1.1 What is FreeTDS?
1.2 Are there plans to implement the OpenServer protocol/library?
1.3 Is there any documentation for the TDS protocol?
1.4 Does FreeTDS support MSSQL?
1.5 Why LGPL license instead of license foo?
1.6 Who is responsible to FreeTDS?
2. Implementation
2.1 Where do I get FreeTDS?
2.2 Do I need to configure anything?
2.3 What's this SYBASE environment variable for?
2.4 Will FreeTDS be thread safe?
2.5 Any plans to write a C++ class library directly over TDS?
3. Sybperl, SQSH , & PHP
3.1 How do I complie Sybperl with FreeTDS?
3.2 How do I compile SQSH with FreeTDS?
3.3 How do I compile PHP 3 with FreeTDS?
4. The CVS Repository
4.1 How to I access the CVS?


General Questions:

1.1 What is FreeTDS?
FreeTDS is a planned free implementation of DB-Lib. It will implement TDS 4.2 and 5.0, so it should be able to communicate with any Sybase products and Microsoft SQL Server.

Once, FreeTDS is sufficiently stable, we will be adding support for CT-Lib and ODBC CLIs. ODBC will be directly implemented over TDS instead of CT-Lib.
 
1.2 Are there plans to implement the OpenServer protocol/library?
Not at this point, there is still much work to do on the client protocol. Maybe later though.
 
1.3 Is there any documentation on the TDS protocol?
Yes, there is some preliminary documentation available here.
 
1.4 Does FreeTDS support MSSQL?
Yes, as long as you configure the libraries with the 4.2 protocol version. See Question 2.2.
 
1.5 Why LGPL license instead of license foo?
I chose LGPL because if you want a commercial client, you can buy them from Sybase, Microsoft or others. I do believe BSDish licenses are better in some cases, but not for something like this.

'nuff said.
 
1.6 Who is responsible to FreeTDS?
Brian Bruns (camber@ais.org)
Started this crazy thing

Gregg Jensen (greggj@savvis.com)
Message handlers and extra datatype support and some sybperl stuff

Arno Pedusaar (psaar@fenar.ee)
Donated his TDS4.2 code to the cause

Mihai Ibanescu (misa@dntis.ro)
GNUified the packet

Craig Spannring (cts@internetcds.com)
Wrote the JDBC and DBI drivers

Implementation:

2.1 Where do I get FreeTDS?
You can get the latest FreeTDS from Metalab. Visit our download page for a direct link.
 
2.2 Do I need to configure anything?
When you untar the package you will need to run a:
$ ./configure
You also have the following options you can add to the configure statement:
--with-tdsver=VERSION
specify the TDS version to use (4.2/4.6/5.0) [default is 5.0].
--with-gnu-ld
assume the C compiler uses GNU ld [default=no]
--enable-shared
build shared libraries [default=yes]
--enable-static
build static libraries [default=yes]
 
IMPORTANT You must build with TDS version 4.2 to access a MSSQL server or Sybase prior to 10.0!
 
2.3 What is this SYBASE environment variable?
Many programs look for the SYBASE environment variable in order to find the libraries home. You will want to set this to the main tds directory. Forexample if your tds installation is in /usr/local than your SYBASE variable would be set to /usr/local/freetds.
 
2.4 Will FreeTDS be thread safe?
Yes, however it is not yet.
 
2.5 Any plans to write a C++ class library directly over TDS?
I have a JDBC-like class library written over dblib. I may port that. (probably not soon)
 

Sybperl, SQSH, & PHP:

3.1 How do I complie Sybperl with FreeTDS?
These instructions will work on RedHat Linux 5.1.

Note: this info is old and needs to be updated.

You can currently build Sybperl2.00_04 (NOT 05!). To get sybperl to compile with FreeTDS first modify the CONFIG file to build with the tds lib, to build DBlib, to build static, and remove the extra libraries except for -lcrypt.

Now here's the most important step. You need to remove any trace of the previous sybperl from your /usr/lib/perl5/site_perl/ directories. There are about three places that it is hiding so it might take a bit to find all the pieces. In particular look under auto/ and i386.../auto. Also remove any trace of DBD::Sybase. The makefiles for these will not do clean uninstalls so you have to do it manually. You should do the make uninstall though to get rid of the linking.

Once that is done do your build like before:
perl Makefile.PL
make
make test
Once make test happens, you might get a fail. You might need to go into Makefile.aperl and search and remove any trace of DBD::Sybase and the old Sybase::CTlib stuff. I don't recall if I ever got the tests to work completely, but the library does work.
 
3.2 How do I compile SQSH with FreeTDS?
Configure sqsh (1.7) normally with ./configure. Make sure your SYBASE variable is set and $SYBASE/lib is in your LD_LIBRARY_PATH, such as:

export SYBASE=/usr/local/freetds
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
./configure

Once configure is done, edit the Makefile and remove all libraries except -lct and 'make'
 
3.3 How do I compile PHP 3 with FreeTDS?
Simply follow the PHP directions but use /usr/local/freetds (or your freetds directory if different) instead of the sybase directory.
  The CVS Repository

4.1 How do I access the CVS Repository?
The CVS repository is set up and versions 0.3 and 0.31 are checked in. The root for anonymous access is :pserver:anon-cvs@freetds.internetcds.com:/Repository

No password is required for anonymous access.

I have decided to place JDBC driver and the parts of the FreeTDS project into a different directories in the CVS repository. It just doesn't seem kosher to combine BSDish and GNUish licensed code in the same tree.

The C code (the GNUish stuff) will go in freetds and the JDBC driver will go in freetds_jdbc.

To get a copy of the sources you would type
% cvs -d :pserver:anon-cvs@freetds.internetcds.com:/Repository login

% cvs -d :pserver:anon-cvs@freetds.internetcds.com:/Repository checkout freetds

% cvs -d :pserver:anon-cvs@freetds.internetcds.com:/Repository checkout freetds_jdbc

The login command will ask you for a password. Just hit enter for the anon-cvs account.



Page design ©1998 Jamison Stepan