UNIXODBC MS SQL Server Installation Configuration
1. Install UnixoDBC
2. Install Freetds
Modify / etc / profile
#
# TDS
#
#Nsybase is the installation path for FreetDS
Sybase = / usr / local
LD_Library_Path = $ {ld_library_path}: $ Sybase / Lib
Export Sybase LD_Library_Path
Install TDS
# ./configure --with-tdsver = 7.0 --with-unixodbc = / usr / local
# Make
# make install
3. Configure TDS
If it is the default installation path in /usr/local/etc/freetds.conf
4. Add DNS
install driver
/usR/local/etc/odbcinst.ini
[TDS]
Description = v0.52 with protocol v4.2
Driver = /usr/local/lib/libtdsodbc.so
Tds.driver.Template
You can run the installation driver, you can also modify ODBCINST.INI directly.
ODBCINST -I -D -F TDS.DRIVER.TEMPLATE
Add DNS
/usr/local/etc/odbc.ini setting system DNS
~ / .odbc.ini Set User DNS
[P450]
Driver = tds
Description = Northwind Sample Database
TRACE = NO
Server = 192.168.1.25
Database = northwind
Uid = sa
Save into tds.datasource.template
run
Odbcinst -i -s -f tds.datasource.template
You can also directly configure odbc.ini
4. Can ISQL -V P450 SA Mypassword
Connect the database