FreeTDS+unixODBC+SQL Server 2005

FreeTDS+unixODBC+SQL Server 2005编译和设置:

参考:

1. unixODBC+FreeTDS+DBD::ODBCでSQL Serverに接続する

   http://rebecca.ac/milano/mt/archives/001412.html

2. Connecting to SQL 2005 via ODBC and Python from Ubuntu - for free

   http://www.neuronical.com/?p=16

Compiling On the Ubuntu 8.04 LTS:

1) unixodbc

    wget http://www.unixodbc.org/unixODBC-2.2.12.tar.gz

    cd $startdir/src/unixODBC-$pkgver

    sed -i 's/YY_FLUSH_BUFFER/yy_flush_buffer(YY_CURRENT_BUFFER)/' sqp/lex.l

    ./configure --prefix=/usr --sysconfdir=/etc --enable-gui=no

    make

    sudo make install

2) libiconv

    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz

    wget http://www2d.biglobe.ne.jp/~msyk/software/libiconv/libiconv-1.12-cp932.patch.gz

    tar xvzf libiconv-1.12.tar.gz

    gunzip libiconv-1.12-cp932.patch.gz

    patch -p0 < libiconv-1.12-cp932.patch

    cd libiconv-1.12

    ./configure --prefix=/usr

    make

    sudo make install

3) freetds

    wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

    cd $startdir/src/$pkgname-$pkgver

    ./configure --prefix=/usr --sysconfdir=/etc/freetds --with-unixodbc=/usr --with-msdblib --with-libiconv-prefix=/usr/lib --with-tdsver=8.0

    make

    sudo make install

MONO+SqlClient编译出错的解决办法:

1. System.NotSupportedException: CodePage 932 not supported.

    For me, installing the following package resolve the issue:

       sudo apt-get install libmono-i18n2.0-cil

2. Cannot connect to the server...

    Modify the freetds.conf and try the sqsh/tsql execute then it work on.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值