Add ODBC DRIVER under Linux-mint

Source: Internet
Author: User
Tags driver manager sql server books

Moved from Https://code.google.com/p/odbc/wiki/InstallingMicrosoftDriverOnDebianLinux, made minor changes

Install the necessary ODBC library

sudo apt-get install LIBODBC1

Download Microsoft SQL driver for Red Hat 6 (Dibian can also be used, just need to make some adjustments)

wget http://download.microsoft.com/download/B/C/D/BCDD264C-7517-4B7D-8159-C99FC5535680/RedHat6/ Msodbcsql-11.0.2270.0.tar.gz

Then go to the download directory unpacking

tar XF msodbc*$ cd MSODBC*

Since this driver is for Red Hat, some of the dependencies under Debian cannot be detected. Need to make some symbolic links to find the location of the dependent libraries

To view the missing dependent libraries

$ ldd lib64/libmsodbcsql-11.0. 2270.0 grep not

The output should be

Libcrypto.so. Ten = Not foundlibssl.so. Ten = not found

Establish Symbolic Links

$ cd/usr/lib/x86_64-linux-sudoinstall libssl-sudoln -S Libssl.so. 1.0. 0 libssl.so. Ten  sudoln -S libcrypto.so. 1.0. 0 libcrypto.so. Ten

Repeat the previous steps to check the dependent libraries, there should be no

After that, just go to the installation directory and execute the installation script that comes with it.

sudo bash./install. SH Install --force

Output if yes

./Install.SH: Line233: Rpm:command not foundchecking for  -bit Linux compatible OS ...... ..... .................. Okchecking Required libs is installed .......... ............... Not FOUNDUNIXODBC utilities (Odbc_config and Odbcinst) installed ..... Not CHECKEDUNIXODBC Driver Manager version2.3.0Installed ....... ........  Not CHECKEDUNIXODBC Driver Manager configuration correct ....... ......... Not Checkedmicrosoft ODBC Driver One  forSQL Server already installed ..... Not Checkedmicrosoft ODBC Driver One  forSQL Server files copied ........ ..........  Oksymbolic links forbcp and sqlcmd created ..... ....... ................. Okmicrosoft ODBC Driver One  forSQL Server registered ......... .....  Installedinstall Log created at/tmp/msodbcsql.6208.20652.13584/Install. Log. One or MoreSteps May has an *. See README for  Moreinformation Regardingthese steps.

It looks like a lot of problems. But it doesn't seem to matter.

Next Run

Sqlcmd-s localhost

The output should be

Sqlcmd:Error:Microsoft ODBC Driver one for SQL server:login timeout expired. Sqlcmd:Error:Microsoft ODBC Driver one for SQL server:a network-related or instance-specific Error have occurred while E Stablishing a connection to SQL Server. Server is not a found or not accessible. Check If instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online: Sqlcmd:Error:Microsoft ODBC Driver one for SQL server:tcp provider:error code 0x274D.

  

Description The Microsoft Library is already installed

Next, create a text file

==/usr/local/lib/libmsodbcsql-11.0. So. 2270.0

Save As Tds.driver.template2

And then

sudo odbcinst-i-D-1/etc

Installation Complete

Add ODBC DRIVER under Linux-mint

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.