Steps for DB2 to access the database on the server from the client (1)

Source: Internet
Author: User
Tags db2 connect db2 connect to

This article describes how to connect to the server from a client in the DB2 database for your reference.

When you access a database on the server from a client in DB2, you cannot directly use the connect command. Instead, you must first establish a communication node and then establish a database connection based on the node. The specific operations on the command line are as follows:

-> Db2 catalog tcpip node ABC remote serverName server 50000
-> Db2 catalog db databaseName at node ABC
-> Db2 connect to databaseName user Uid using Pwd

Note:

ABC in catalog tcpip node ABC is the name of a node you can start from. The name cannot be repeated with the existing name.
ABC in catalog db databaseName at node ABC refers to the name you mentioned earlier.
ServerName server name (remote database)
DatabaseName Database Name
Uid Username
Pwd Password
In addition, if the client has already established a node with the same server, if you want to connect to another database on the server, you do not need to create another node and use the same node directly. In addition, the port after the server name is not necessarily 50000 when the node is created, depending on the Database Engineer's current settings.
Related commands:
List db directory list accessible db
List node directory list Accessible Nodes
Other important DB2 commands

1. view the local node directory

In the command window, enter db2 list node directory.

2. cataloguing a TCP/IP Node

Command window: db2 catalog tcpip node <node_name> remote

3. Cancel node Cataloguing
Db2 uncatalog node <node_name>


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.