|
|
[ÀϹÝ] freetds ¼³Ä¡ »ó¼¼¹æ¹ý |
|
È£¼® ´Ô²²¼ ¾´ ±ÛÀÔ´Ï´Ù - 211.¢½.74.31 |
ÀÐÀ½:7266 |
|
|
¢Ñ unixodbc ¼³Ä¡
./configure --prefix=/usr/local/odbc --sysconfdir=/etc --enable-drivrs=yes --enable-gui=no
make ; make install ;
¢Ñ freetds ¼³Ä¡
./configure --prefix=/usr/local/freetds --with-unixodbc=/usr/local/odbc
make ; make install ;
¢Ñ1> freetds.conf ¼öÁ¤
.....
.....
[sql151]
host = xxx.xxx.xxx.151
port = 1433
tds version = 8.0
¢Ñ tds.driver.template µå¶óÀ̹ö ÆÄÀÏÀÇ ¼³Á¤
[freeTDS]
Description = v0.52 with protocol v4.2
Driver = /usr/local/freetds/lib/libtdsodbc.so
¢Ñ odbcinst -i -d -f tds.driver.template
¢Ñ tds.datasource.template
[idc151]
Driver = freeTDS
Description = IDC 151 svr
Trace = No
Servername = sql151
Database = PSERP
¢Ñ odbcinst -i -s -f tds.datasource.template
¢Ñ /etc/odbcinst.ini ÈÀÏ
[ORACLE]
Description = Easysoft ODBC Oracle Driver
Driver = /usr/local/easysoft/oracle/libesoracle.so
Setup = /usr/local/easysoft/oracle/libesoraclesetup.so
FileUsage = 1
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/local/freetds/lib/libtdsodbc.so
UsageCount = 1
¢Ñ freeTDS ÀÇ Å×½ºÆ®
- tsql -H sql151 -p 1433 -U sa
- tsql -S idc151 -U sa
- unixodbc ¿¡¼ Å×½ºÆ®
/usr/local/odbc/bin/isql -v idc151 sa MyPassword
Test tsql of FreeTDS, e.g.:
tsql -S Kana -U 'username' -P 'password'
locale is "C"
locale charset is "646"
1> use Northwind
2> go
1> select * from mies
2> go
aap
mies
1>quit
Test isql of unixODBC:
isql -v Kana 'username' 'password'
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select * from mies;
+-----------+
| aap |
+-----------+
| mies |
+-----------+
SQLRowCount returns 1
1 rows fetched
SQL> quit
|
|
|
121.¢½.39.7
|
|
|
10-07-06 16:44
|
|