4 Recommended UnixODBC settings for MSSQL

Installation

  • Red Hat Enterprise Linux/CentOS:
  1. # yum -y install freetds unixODBC
  • Debian/Ubuntu:

Please refer to FreeTDS user guide to download necessary database driver for the corresponding platform.

For some additional information please refer to: installing unixODBC.

Configuration

ODBC configuration is done by editing the odbcinst.ini and odbc.ini files. These configuration files can be found in /etc folder. The file odbcinst.ini may be missing and in this case it is necessary to create it manually.

Please consider the following examples:

odbcinst.ini

  1. $ vi /etc/odbcinst.ini
  2. [FreeTDS]
  3. Driver = /usr/lib64/libtdsodbc.so.0

odbc.ini

  1. $ vi /etc/odbc.ini
  2. [sql1]
  3. Driver = FreeTDS
  4. Server = <SQL server 1 IP>
  5. PORT = 1433
  6. TDS_Version = 8.0