Install and configure freetds

Source: Internet
Author: User
Tags mssql sybase
Install and configure freetds-connect to msssql in Linux

Connecting to MSSQL in Linux is very painful because Microsoft does not provide any interfaces to developers. They think that MSSQL is only a Windows operating system. Fortunately, MSSQL is derived from Sybase. Some buddies have made some connection libraries in Sybase Linux. These connection libraries also support MSSQL, and freetds is just like this.

The intended readers of this article, I think, are those who want to write C or C ++ programs in Linux or UNIX to connect to mssql2000, because I am like this. At the same time, those who write PHP can also refer to it. Of course, if you are using PHP, you may also need to know how to install Apache and PHP scripts.

Speak nonsense and start with the question.

I. Related Software

Freetds Source:

Http://www.freetds.org

Version: 0.63

: Http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

This software can use Linux and UNIX to connect Ms sqlserver and Sybase databases.

Ii. installation and configuration

2.1 compile and install freetds:

$ Tar zxvf freetds-stable.tgz (unzipping)

$./Configure -- prefix =/usr/local/freetds -- With-tdsver = 8.0 -- enable-msdblib

$ Make

# Make install

 

Parameter description:

Install freetds to the directory/usr/local/freetds: -- prefix =/usr/local/freetds

Mssql2000: -- With-tdsver = 8.0 -- enable-msdblib

2.2 configure freetds library files

Configure the path of the freetds library file to the LD_LIBRARY_PATH parameter:

$ Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/localfreetds/lib /:

The purpose of this operation is to avoid loading the freetds library file.

Iii. Test

Freetds-0.63/src/apps/tsql. C, is a good test program, can compare this file to the MSSQL connection encoding.

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.