ODBC Driver 13.1 for Linux Preview 2 Released


Hi all, we are delighted to share the second preview release of the Microsoft ODBC Driver 13.1 for Linux –  (Ubuntu, RedHat and SUSE). The preview release adds support for Ubuntu 16.10, new features, has bug fixes and enables access to SQL Server, Azure SQL Database and Azure SQL Data Warehouse from any C/C++ application on Linux. 

What’s new

  • Added:
    • Ubuntu 16.10 Support 
    • Dependency on the platform unixODBC Driver Manager instead of the custom unixODBC-utf16 Driver Manager
      • This avoids conflicts with applications/software that depends on the platform unixODBC Driver Manager

 

  • Fixed
    • Driver failure when connecting with more than 1024 handles
      • Switched away from using the libio select function. Driver now supports (theoretical) handle limit of 64k or platform max
    • Intermittent Communication Failure when using Azure DW and Azure SQL DB
      • In some high latency scenarios over an encrypted channel, the driver could fail unexpectedly. This preview release fixes this issue. 

Install the ODBC Driver for Linux on Ubuntu 15.10

sudo su 
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/15.10/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql=13.1.3.0-1 
sudo apt-get install unixodbc-dev #this step is optional but recommended*

Install the ODBC Driver for Linux on Ubuntu 16.04

sudo su 
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql=13.1.3.0-1 
sudo apt-get install unixodbc-dev #this step is optional but recommended*

Install the ODBC Driver for Linux on Ubuntu 16.10

sudo su 
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.10/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql=13.1.3.0-1 
sudo apt-get install unixodbc-dev #this step is optional but recommended*

Install the ODBC Driver for Linux on RedHat 6

sudo su
curl https://packages.microsoft.com/config/rhel/6/prod.repo > /etc/yum.repos.d/mssql-release.repo
exit
sudo yum update
sudo yum remove unixODBC-utf16 unixODBC-utf16-devel #to avoid conflicts
sudo ACCEPT_EULA=Y yum install msodbcsql-13.1.3.0-1 
sudo yum install unixODBC-devel #this step is optional but recommended*

Install the ODBC Driver for Linux on RedHat 7

sudo su
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
exit
sudo yum update
sudo yum remove unixODBC-utf16 unixODBC-utf16-devel #to avoid conflicts
sudo ACCEPT_EULA=Y yum install msodbcsql-13.1.3.0-1
sudo yum install unixODBC-devel #this step is optional but recommended*

Install the ODBC Driver for Linux on SUSE 12

sudo su 
zypper ar https://packages.microsoft.com/config/sles/12/prod.repo 
zypper update
exit 
sudo ACCEPT_EULA=Y zypper install msodbcsql-13.1.3.0-1
sudo zypper install unixODBC-devel

Note: Packages for SQL Server Command Line tools v13.1 will be available soon. The above mentioned packages only install the ODBC Driver for SQL Server that enable connectivity from any C/C++ application. To install and use the SQL Server Command Line tools, check out the instructions here: https://blogs.msdn.microsoft.com/sqlnativeclient/2016/10/20/odbc-driver-13-0-for-linux-released/

Try our Sample

Once you install the driver that runs on a supported Linux distro, you can use this C sample to connect to SQL Server/Azure SQL DB/Azure SQL DW. To download the sample and get started, follow these steps:

wget "https://raw.githubusercontent.com/Microsoft/sql-server-samples/master/samples/tutorials/c/linux/sample_c_linux.c"
gcc sample_c_linux.c -o sample_c_linux -lodbc -w #make sure you change the servername, username and password in the connections string
./sample_c_linux

If you installed the driver using the manual instructions found here, you will have to manually uninstall the ODBC Driver and the unixODBC Driver Manager to use the deb/rpm packages. If you have any questions on how to manually uninstall, feel free to leave a comment below. 

Please file bugs/questions/issues on our Issues page. We welcome contributions/questions/issues of any kind. Happy programming!

Survey and Future Plans

Please take this survey to help prioritize features and scenarios for the next release of the ODBC Driver for Linux. Going forward we plan to expand SQL Server 16 Feature Support (example: Always Encrypted), improve test coverage, and fix bugs reported on our Issues page.

Please stay tuned for upcoming releases that will have additional feature support and bug fixes. This applies to our wide range of client drivers including PHPJDBC and ADO.NET which are already available.

Meet Bhagdev (meetb@microsoft.com)

sql-loves-linux_2_twitter-002


Comments (7)

  1. Markus says:

    Hi all,

    today we received msodbcsql-13.1.4.0-1.x86_64 via yum.
    Is this the final version to use in production?

    1. Meet Bhagdev says:

      Yes it is. Blog should be going out soon.

  2. David Ritter says:

    Does the ODBC Driver for Linux require the specific version of unixODBC that is distributed with each OS? I have a build of unixODBC 2.3.4 and would rather use that as my driver manager. Is the driver certified/required to be used with certain unixODBC versions/distributions?

    Thank you,
    David Ritter

  3. David Ritter says:

    Hello,

    Given “Dependency on the platform unixODBC Driver Manager instead of the custom unixODBC-utf16 Driver Manager” is there a reason this step is still recommended?

    sudo yum install unixODBC-devel #this step is optional but recommended*

    Am I correct in assuming it is just to make sure that the development header files for unixODBC are present for anyone writing ODBC applications with the driver?

    Thank you,
    David Ritter

    1. Meet Bhagdev says:

      Hi David this is correct. This step is for folks trying to write apps that require header files made available with the unixODBC-devel package.

  4. Tim says:

    Does this release include a fix for https://connect.microsoft.com/SQLServer/feedback/details/2693027/microsoft-odbc-driver-13-for-linux-memory-leak
    We are seeing a memory usage climb significantly over time (performing an insert of 200k records we are seeing the processes memory usage climb to around 230MB vs a stable 27MB using the FreeTDS driver) which is never released. Would like to take advantage of the bulk copy features.

    1. Meet Bhagdev says:

      This release does not, but the next one should have a fix to similar issue. Can you share a repro script so that we can use it to verify?

Skip to main content