Microsoft ODBC Driver installation on Linux

The Below post will explain how to install Microsoft ODBC driver on Linux server.

Here i have installed on Redhat Linux 5.8 server

Why we need ODBC driver?

The Microsoft ODBC Driver For SQL Server provides native connectivity from Windows to Microsoft SQL Server and Windows Azure SQL Database.



Prerequisites for Installing
=========================

This driver is only supported on 64-bit Red Hat Enterprise Linux 5 or
64-bit Red Hat Enterprise Linux 6. Other configurations are not supported
and will not likely work.

The following libraries must be installed for the driver to work:

RedHat 5:
glibc
e2fsprogs
krb5-libs
openssl

RedHat 6:
glibc
libuuid1
krb5
openssl

Most likely these libraries are installed, as they should come installed by
default on the supported versions of RedHat Linux.


Note: 
Important: Delete any driver manager packages installed on your computer before you install the unixODBC Driver Manager. Installing the unixODBC Driver Manager could cause a failure of an existing Driver Manager.


The installation script can verify most of these configuration
prerequisites by running:

./install.sh verify




Step 1:

Down load the ODBC Driver Manager from below link. This driver manager will help to install ODBC Driver in linux server

http://www.microsoft.com/en-us/download/details.aspx?id=36437

File name : msodbcsql-11.0.2270.0.tar.gz

Copy the downloaded file to server /tmp directory

#tar -zxvf msodbcsql-11.0.2270.0.tar.gz

#cd msodbcsql-11.0.2270.0

#./build_dm.sh --help  ( Check the available command options in build command)



What If The Driver Manager Isn't Configured Properly?
-----------------------------------------------------

You may build a properly configured unixODBC Driver Manager using the
build_dm.sh script included.  However, if this script is unable to
complete, you may configure and build the proper driver manager yourself
using the instructions below:

Step 2 : 


1. Remove any older installed version of unixODBC (for example, unixODBC
2.2.11).  On Red Hat Enterprise Linux 5 or 6, you can do this by executing
the following command: yum remove unixODBC.

2. Go to http://www.unixodbc.org/.

3. Click the Download link, on the left side of the page.

4. Click the Download link, on the next page, and save the file
unixODBC-2.3.0.tar.gz to your computer.

5. On your Linux computer, execute the following command: tar xvzf
unixODBC-2.3.0.tar.gz

6. Change to the unixODBC-2.3.0 directory.

After copy the file you will get files like below in  your directory.




Step 3:

Copy the downloaded driver to below location 

#cp /tmp/unixODBC-2.3.0.tar.gz /tmp/msodbcsql-11.0.2270.0

Execute the following command to begin the unixODBC Driver Manager installation: 


#./build_dm.sh --download-url=file://unixODBC-2.3.0.tar.gz.


#cd /tmp/unixODBC.5062.15565.23677/unixODBC-2.3.0; make install

#cd /tmp/msodbcsql-11.0.2270.0

# ./install.sh install

#./install.sh verfiy








You can confirm the ODBC driver installed on server using below command

# odbcinst -q -d -n "ODBC Driver 11 for SQL Server"











0 comments:

Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks