1.unixODBC安装
tar zxvf unixODBC-2.2.1.tar.gz
cd unixODBC-2.2.1
./configure --prefix=/usr/local/unixODBC-2.2.1 --includedir=/usr/include --libdir=/usr/lib -bindir=/usr/bin --sysconfdir=/etc
make
make install
2.freetds安装
$ tar zxvf freetds-stable.tgz(解压)
$ ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib
$ make
$ make install
错误:
[root@tux2 bin]# isql sqlserver075 sa 000000 -v
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
[ISQL]ERROR: Could not SQLConnect
解决方案
[sqlserver075]
Description =SQLSERVER 72.75
Driver =MSSQL
Server =192.168.72.75
Database =Northwind
Port =1433
Option =3
Password =000000
User =sa
TDS_Version =7.0
添加TDS_Version =7.0