LinuxからSQLServerへアクセスしたい時に必要となるモジュール
2016/10/19
毎回検索して探さないといけないので書いておく
TDSについて
http://blogs.technet.com/b/sqlpm-j/archive/2009/04/30/sds-tds.aspx
■unixODBC
サイト: ftp://ftp.unixodbc.org/pub/unixODBC/
$ curl -O ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.1.tar.gz $ tar xvfz unixODBC-2.3.1.tar.gz $ cd unixODBC-2.3.1 $ ./configure --prefix=/usr/local/<code>basename $PWD</code> $ make # make install
■FreeTDS
サイト:ftp://ftp.astron.com/pub/freetds/
$ curl -O ftp://ftp.astron.com/pub/freetds/stable/freetds-stable.tgz $ tar xvfz freetds-stable.tgz $ cd freetds-0.91 $ ./configure \ --prefix=/usr/local/<code>basename $PWD</code> \ --enable-shared \ --enable-static \ --enable-odbc-wide \ --with-tdsver=8.0 \ --with-unixodbc=/usr/local/unixODBC-2.3.1 $ make # make install
■FreeTDSとunixODBCの設定
/etc/freetds/freetds.conf
[SqlServer] host = <DatabaseのIP> port = <Databaseのポート: Default=1433> tds version = 8.0 client charset = UTF-8
/etc/odbcinst.ini