Install and access the SQLSERVER2000 database in Linux (with File Download)

Source: Internet
Author: User
Tags mssql server sybase database
First, install the ODBC driver unixODBC on Linux. Download www.unixodbc.org and install it. You can also select a graphical interface for installation.

First, install the ODBC driver unixODBC on Linux. Download www.unixodbc.org and install it. You can also select a graphical interface for installation.

First, install the ODBC driver unixODBC on Linux. The URL is

After the download, you can also select the graphical interface for installation. Relevant documents are also available on this website. UnixODBC can connect to SQL 2000. mssql and most database systems on Linux.

There is an open ctlib.

I believe that Linux users do not know the FreeTDS tool. The biggest benefit of this kind of stuff is that it can access Sybase and ms SQL in Linux. The author of FreeTDS said on its website that it can be used in Unix, but I didn't see any download of the Unix version. Now For Linux the latest version is: freetds-0.63; click to download the freetds-0.63, download after the cut pressure backup, I will talk about the installation method and use it.

1. Download freetds-0.63. Be sure to download the freetds-0.63 version of this site, and finally I will tell you the benefits of version 0.63.

2.set the Liunx directory on freetds-0.63.tar.gz ftp. Unpack and enter the folder after unpacking. Change to the root user (preferably the root permission. Other accounts may have permission issues during compilation)

3. the FreeTDS configuration is as follows. The FreeTDS parameter is described first: -- prefix is the installation directory for setting FreeTDS, -- with-tdsver is the TDS version, and -- enable-msdblib is the function library for whether to allow Microsoft databases.

Now, in the directory, type:
./Configure -- prefix = -- with-tdsver = 8.0 -- enable-msdblib -- enable-dbmfix -- with-gnu-ld -- enable-shared -- enable-static

Note: tdsver = 8.0 is required to support MS SQL2000. tdsver = 7.0 supports MS SQL7.

Then compile and install:
Make
Make install

In this case, the basic OK is not enough. We still need to configure the/etc/freetds. conf file, and add the IP address of MSSQL and Its configuration information according to the file help. Below, I list my freetds. conf MS 2000 configuration information.

# A typical Microsoft SQL Server 2000 configuration
[IBMSQL]
Host = 10.10.10.211
Port = 1433
Tds version 8.0

Simple, in fact, is to bind your SQL2000 database and port 1433 (ms SQL are port 1433) with the IBMSQL symbol name. Of course, you can also access ms SQL without configuring these parameters.

4. Type in any directory:
Tsql-h mssql Server Service IP-p 1433-u mssql Server login account-p mssql Server login password

Example: tsql-H10.10.10.211-p1433-Usa-P123456

Or: tsql-SIBMSQL-p1433-Usa-P123456

If the output is>, it means you have succeeded. Prepare to input select * from data name. dbo., then go

Of course, there is also the BCP tool, using freebcp. You can refer to the help, I will not talk about it, it is also very useful.

5. summary: At the beginning I installed freetds is always unable to access MSSQL, so everyone's MSSQL2000 must be upgraded to SP4 (sp3 can also be estimated); the biggest good news is: freetds-0.63 support Chinese. Can I query Chinese information instead of using it? . Oh, it's a good word.

By the way, I use it to access the Sybase Database in my Linux environment, which is not bad.

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.