1

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.

2 Answers 2

1

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

    [FreeTDS]
    Description = TDS driver (Sybase/MS SQL)
    Driver = /usr/lib/odbc/libtdsodbc.so
    Setup = /usr/lib/odbc/libtdsS.so

worked just fine!

0

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:
wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
#wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/current/freetds-current.tgz
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .