SQL Server to DB2 Connection Server Implementation
Author: CCBZZP interconnection of different database platforms generally called heterogeneous database services, can now achieve such heterogeneous interconnect between all major databases, but the manufacturers not the same as the specific implementation technology, such as: in SQL SERVER It is called Linked Server, and Internet interconnection with other databases is implemented via ODBC.
The test environment of this article is:
Operating system: Windows2000 Server (Traditional System)
Installation Database: SQLServer2000 (English) and DB2 7.2 Client (English)
Specific implementation steps: 1. Requires installation of DB2 client software and SQLServer2000 software on your PC. 2. Configure Windows ODBC Data Sources: Start Menu - "Program Set -" System Management Tool - "Data Source (ODBC) -" Enter User DSN or System DSN can: Add - "Select IBM DB2 ODBC Driver" Custom Data Source Name (freely as: db2test) - "Database Name (must!) -" OK is done.
3. Select the data source name just configured, then select the configuration, and jump out of DB2 Messages:
THE DATA SOURCE IS Not Connected. Connecting to the Data Source Will Provide Useful Information During Configuration. WOULD you like to connect to the data source?
Select Yes (OK or confirmation)
Enter the Connect to DB2 Database screen:
User ID: Enter users of DB2 Database
Password: Enter the password of the user of DB2 Database
Connection Mode: You can choose the default Share mode
Select OK (confirm)!
Configure and test ODBC!
4. Configure the Connection Server in SQLServer2000: Enterprise Manager - "Security -" Connection Server - "Right click New Connection Server -" Defines the Name of the Connection; Select another data source; specify the program name: IBM OLE DB Provider for DB2 Servers; The product name can not be filled; the data source specifies the data source name that is just defined in the odbc; the provider string is filled in in the following format: user ID = username; password = userpasswd (or press UID = UserName; PWD = Userpasswd), The username and password here correspond to the username and password in the DB2 database you want to connect - "Security tab: Settings with this security context, and enters DB2 database username and password -" Server Options tab can be default - "OK . 5. All preparations are all completed! In SQLServer Enterprise Manager - "Security -" Connection Server Opens the Junited Connection Server - "Click on the table, you can see all the table names owned by the DB2 database user on the right window, but you can't view it here. Record of the table, this need to be implemented in specific SQL in the query analyzer of SQ Server! When accessing the table, the format is: [Connect Server Name] .. [DB2 User]. [Type]. More detailed use is not described here.
In the future, add it!