Step by Step: Setting up Linux ODBC driver for SQL Server

After setting up Redhat Linux 6.3 in Hyper V image follow the instructions outlined on TechNet - to install the Driver Manager.



















1) Go to unixODBC ( page and select Download


Download the unixODBC-2.3.0 version.







3) Extract the files


4) Start a Terminal session

Note: Ensure that gcc (C compiler) is installed and in PATH

Type the following commands, ensuring you are running as the root user and in the directory where the ODBC driver files where extracted.


No messages will be seen after execution of this command


No messages will be seen after execution of this command

./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE

There will be compilation activity taking place and you will see the following screen:


Type make

There will be lots of messages similar to those on the screen


Type make install (this requires that you are logged in as the root user)


Now we can install the SSQL Server ODBC Driver for Linux. For more information see -

1) Extract out the native client files. These can be downloaded from - Ensure you download the appropriate version for your Red Hat version.


2) Open up Terminal window – change directory to the location where files where extracted


Type ./ – it will just output information as per above screenshot. Next type ./ verify. It will indicate if the computer has all the required components to install the Driver for Linux.

If it comes back with OK for all then we can proceed to install.

Type ./ install

License agreement displays


Keep on pressing space bar to move the text along

Type YES if you agree to the license and to complete the installation


Run the following command to verify that the SQL Server ODBC Driver for Linux was registered successfully: odbcinst -q -d -n "SQL Server Native Client 11.0"


Test out connectivity to SQL Server using sqlcmd or Sample C++ code which can be found at -

I used sqlcmd as per below screenshot:



Now your Linux based applications can enjoy the use of SQL Server 2012, so don't let the requirement of Linux applications stop you from using your favorite database system – SQL Server 2012.