Implementation of SQL Server to DB2 connection server

Source: Internet
Author: User
Tags db2 db2 client db2 odbc driver dsn ibm db2 ibm db2 odbc driver odbc table name

The interconnection of different database platform is commonly called the heterogeneous service of the database, now each big database can realize such heterogeneous interconnection, but the specific implementation technology of each vendor is not the same, such as: In SQL Server called linked server, through ODBC and other database interconnection.

The test environment for this article is:

Operating system: WINDOWS2000 SERVER (Traditional system)

Install the database: SQLSERVER2000 (English) and DB2 7.2 clients (English version)

Specific steps to achieve:

1. require PC to install DB2 client software and sqlserver2000 software.

2. Configure Windows ODBC Data source:

Start Menu-"assembly-" System management Tool-"data source (ODBC)-" Enter configuration User DSN or System DSN can: Add-"Select IBM DB2 ODBC driver-" Custom data source name (optional: db2test)-"Database name (required!) )-"OK complete."

3. Select the name of the data source that you just configured, then select Configure and jump out of DB2 MESSAGES:

The data source is not connected. Connecting to the data source would provide useful information during configuration. Would to connect to the data source?

Select Yes (OK or confirm)

Enter connect to DB2 database screen:

User ID: Users entering DB2 database

PASSWORD: Enter the user's password for DB2 database

CONNECTION mode: You can choose the default share mode

Select OK (confirm)!

Configure and test ODBC complete!

4. Configure the connection server in sqlserver2000:

Enterprise Manager-"Security-" Connection server-"right" New connection server-"Define the connection name, select a different data source, and specify the program name: IBM OLE DB Provider for DB2 SERVERS; Product name is not filled; Data source Specifies the name of the data source that is defined in ODBC just now; the provider string is filled in the following format: User id=username; PASSWORD=USERPASSWD (or in the following format: Uid=username; PWD=USERPASSWD), where the username and password correspond to the user name and password in the DB2 database to which you want to connect-security tab: Set in this security context, and enter the DB2 username and password-the Server Option tab page can be determined by default-".

5. All preparations are complete! In SQL Server Enterprise Manager-"security-" connect the server to open the newly built connection server-"Click on the table, you can see in the right window of the DB2 database users have all the table names, but here is not to view the records of the table, This needs to be implemented in the Sqserver Query Analyzer with specific SQL! When accessing a table, use the format: [Connect server name]. [DB2 user]. [Table name]. More detailed and specific use here no longer repeat.

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.