rianto isaac's Weblog

rianto utomo isaac sahala utomo

php msssql, freetds odbc di linux connect mssql

leave a comment »

sudo apt-get unixodbc unixodbc-dev freetds-dev tdsodbc

and configured freetds as follows:

--- /etc/freetds/freetds.conf ---
[TS]
host = SERVER
port = 1433
tds version = 7.0
client charset = UTF-8

As I need an odbc connection I configured odbcinst.ini as follows:

--- /etc/odbcinst.ini ---
[FreeTDS]
Description = FreeTDS
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
FileUsage = 1
CPTimeout =
CPResuse  =
client charset = utf-8

and odbc.ini as follows:

--- /etc/odbc.ini ---
[TS]
Description = "test"
Driver = FreeTDS
Servername = SERVER
Server = SERVER
Port = 1433
Database = DBNAME
Trace = No

perhatian, agar odbcinst.ini dan odbc.ini disesuaikan dengan LINUX masing-masing, 
karena linux saya posisinya ada di /usr/lib/odbc/libtdsodbc.so 
dan bukan di /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
 
rianto utomo bole nyontek dari http://askubuntu.com/questions/167491/connecting-ms-sql-using-freetds-and-unixodbc-isql-no-default-driver-specified

Written by isaaconi

Juli 24, 2013 pada 11:34 am

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: