For the version 11 of the Microsoft ODBC Driver for SQL Server on Debian Wheezy there was this really good post. Most of it remains usefull and here is just an update knowing everything is quite easier on jessie as the version of the unixodbc package manages those Microsoft drivers.
The hardest is to take the right version of the ODBC driver on the Microsoft website. In version 11 only RedHat driver was released and its libraries were luckily supported by Debian (just changing their names). It’s not with version 13. However, Microsoft now offers several versions of the drivers including an “Ubuntu” one, closer to Debian. It is available at: https://download.microsoft.com/download/2/E/5/2E58F097-805C-4AB8-9FC6-71288AB4409D/msodbcsql-22.214.171.124.tar.gz.
The dependencies to install version 13 are:
- unixodbc: version 2.3.1 that comes with Jessie is enough (but optimizable by compiling a new version)
- libgss3: this is new in version 13
Then the installation is limited to:
sudo apt-get install unixodbc libgss3 wget https://download.microsoft.com/download/2/E/5/2E58F097-805C-4AB8-9FC6-71288AB4409D/msodbcsql-126.96.36.199.tar.gz -zxf tar-188.8.131.52.tar.gz msodbcsql cd-msodbcsql 184.108.40.206 sudo ./install install --force
NB: It looks possible not to use the
--force option, but you’ll have to patch
install.sh and deal with the installation of
Once done, always run a small
ldd /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0 to ensure that all your dependencies are met and functional.
Finally, you just have to use it knowing the installer automatically creates this entry in
[ODBC Driver for SQL Server 13] Description = Microsoft ODBC Driver for SQL Server 13 Driver = / opt / microsoft / msodbcsql / lib64 / libmsodbcsql-13.0.so.0.0 Threading 1 = UsageCount = 3