Introduction to DB2 database connection methods

Source: Internet
Author: User
Tags db2 odbc driver ibm db2 ibm db2 odbc driver

This article describes the detailed steps for connecting to the DB2 database for your reference. Compared with SQL and ORACLE, DB2 database connection is more troublesome. The connection includes the following steps:

1. First, map the database on the database server to the client for ODBC reasons)

The ing command is as follows:

Db2cmd
Db2
// Map the remote node 192.168.80.207: 50001 to the local node node207
Catalog tcpip node node207 remote 192.168.80.207 server 50001
// Map the database zcldb to the local node207 Node
Catalog database zcldb at node node207

2. Added ODBC to connect to the local DB2 ing database.

3. The application connects to ODBC

Connection string:

<Add name = "DB2ConnectionString" connectionString = "driver = {IBM DB2 odbc driver}; DSN = localdbname; UID = user; DBALIAS = localdbname; MODE = SHARE; PWD = password; "providerName =" System. data. odbc "/>

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.