Catalog, a word that is hard to understand in the DB2 database

Source: Internet
Author: User

Introduction: In the DB2 databaseIsCatalogThis word is hard to understand. Specifically, cataloguing includes cataloguing nodes and cataloguing databases. If you want to understand the cataloguing, let me briefly introduce the architecture of the DB2 database. The biggest concept in the DB2 database is the system (node), that is, the host. Below is an instance, below the instance is the database, then the tablespace, and then the database object. Now suppose you have a database server on p570, and you have a client on windows, linux, or any platform. Now you want to establish a client-to-server connection, what are the specific steps?

Step 2:
You must identify the remote server on the client machine. How can this problem be solved? The catalog Method Used in DB2 is to write a remote server in a local client file by cataloguing:
Db2 catalog tcpip node p570 remote 172.10.10.10 server 50000

In the preceding command, the p570 is a node name (which must be unique on a machine), the remote server is followed by the server IP address, and the server is the port number corresponding to the instance on the remote server. DB2 records the remote server information in the local SQLNODIR file in this way. Therefore, the cataloguing node maps the remote server to the local server, the records in SQLNODIR can be used to locate the remote server and instance, similar to the address pointer pointing to the remote server and instance.

Step 2:

After the remote server IP address and instance are catalogued, the database under the instance should be catalogued locally in step 2.
Db2 catalog db REMOTEDB at node p570
In this command, REMOTEDB is the database under the remote instance, and p570 is the name of the target node in step 1.
After this command is executed, the remote database information is recorded in the local SQLDBDIR file, here, the cataloguing database can be understood as ing the database under the remote server instance to a local machine as an alias 3 b2 {2 _: I)

The preceding example shows that the client and server are not on the same machine, and the database is catalogued through the cataloguing node to connect the client to the database on the server. If the client is connected to the same machine, at this time, do not display the cataloguing nodes. However, when we create an instance on the server, there is an implicit process of cataloging the instance locally, assume that an instance named db2inst1 is created on p570, there is an implicit
Db2 catalog local node db2inst1 instance db2inst1 system p570 ostype aix steps,
Similarly, when you create a database MYDB under db2inst1, there is an implicit catalog Database step.

Db2 catalog db mydb at node db2inst1 step (k9 K5 J (J! J
Now you can understand the catalog, which is the purpose of establishing a database connection from the client to the server locally or remotely.

The catalog word that is hard to understand in the DB2 database is introduced in the previous article. Now you know something about the catalog word that is hard to understand in the DB2 database, if you want to learn more about the word catalog that is difficult to understand in the DB2 database, I will continue to introduce you to other articles in the future, I hope you will get something from the above explanation.

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.