Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a Python project that uses DSN-less connections with SQLAlchemy / pyodbc / unixODBC / FreeTDS to fetch data from a SQL Server database. Now I would like to set client charset directly in the connection string which is not possible in FreeTDS versions prior to 0.91.

Unfortunately 0.91 is not available in any PPA or as a deb file and as my compiling skills are quite lacking I haven't been able successfully compile it directly from source.

A user over at the Ubuntu Forums seems to have the same problem.

So, how would I go about compiling FreeTDS 0.91 on Ubuntu 11.04 x64? Any help would be greatly appreciated.

share|improve this question

I used :

    ./configure --prefix=/usr --sysconfdir=/etc --with-unixodbc=/usr

to install freetds 0.9.1 to install on ubuntu 11.04. In /etc/odbcinst.ini

    Description = TDS driver (Sybase/MS SQL)
    Driver = /usr/lib/odbc/
    Setup = /usr/lib/odbc/

worked just fine!

share|improve this answer

From my notes on Debian Squeeze x64, so might be a bit different on your Ubuntu, I think I just followed the instructions in the documentation. Haven't tested if this specific variant works with e.g. odbc, but it compiles and installs ok.

# as root:
# tried gnutls for ssl/tls support.
aptitude install build-essential automake libgnutls-dev
cd /root
#Stable release:
tar xvzf freetds-stable.tgz
# of course adjust depending on directory created:
cd freetds-0.91/
# see documentation 
# for what you can configure
# using tdsver 7.2 for fairly recent sql server dbs.
# make sure unixodbc is already installed in advance
# aptitude install unixodbc
# couldn't get openssl or gnutls ssl support working on a fairly clean system
# haven't looked into it further
./configure --disable-server --disable-pool --enable-krb5 --enable-sspi --enable-msdblib --with-tdsver=7.2
make; make install; make clean
# stuff gets installed in /usr/local/lib and other locations
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.