Installation guide
mxODBC - Python ODBC Database Interface 
The new Microsoft SQL Server Native Client for Linux is a port of the SQL Server 
Native Client for Windows to Linux. It provides an ODBC driver for SQL Server 
2008 R2 and 2012 on Linux, but also works with SQL Server 2005 and 2008. At 
the moment, only a 64-bit version is available and then only for RedHat RHEL 5 
and 6 systems. 
Most of the comments for the Windows driver also apply to the Linux driver. 
This driver also supports the MARS feature. See "Multiple active result sets (MARS) 
on a single connection" further up for details. 
 Driver Limitations 
•  The driver still has some issues and can produce segfaults (see below), 
but it's already good enough for testing and simple setups. 
•  The driver only works on 64-bit Linux distributions and requires the 
unixODBC 2.3.2 ODBC manager (2.2 won't work due to ABI differences). 
•  The mxODBC DriverConnect() API cannot be used with Unicode 
connection strings when using this driver: the SQL Server Native Driver 
for Linux causes a segfault when trying to connect using a Unicode 
connection string (which triggers the use of Unicode ODBC APIs). We 
have confirmed this for version 11.0.1790 and 11.0.2270 of the driver. 
Unfortunately, we cannot add a work-around to mxODBC to guard 
against this, since mxODBC only receives the driver name after the 
connect. 
  Example Configuration for Unix 
Here is a sample setup for the SQL Server Native Client for Linux: 
•  Install the driver following the instructions given by Microsoft
. Here's 
quick version: 
tar xvfz sqlncli-11.0.1790.0.tar.gz 
cd sqlncli-11.0.1790.0/ 
mkdir -p /opt/microsoft/sqlncli/bin 
mkdir -p /opt/microsoft/sqlncli/lib 
./install.sh install --force --accept-license \ 
 --bin-dir=/opt/microsoft/sqlncli/bin \ 
 --lib-dir=/opt/microsoft/sqlncli/lib 
You can ignore any warnings. Note that using the driver directly from the 
untarred archive is not possible, since the installation location appears to 
be hardwired in the driver. 
•  Depending on your Linux distribution, you may have to add symlinks to 
your OpenSSL libraries to match the ones used on RedHat: 
cd /lib64 
ln -sf libssl.so.1.0.0 libssl.so.10 
ln -sf libcrypto.so.1.0.0 libcrypto.so.10 
ldconfig 
•  Add the driver to the /etc/odbcinst.ini (or ~/.odbcinst.ini): 
36 










