A simple understanding of the concept of cataloging in DB2

Source: Internet
Author: User

In the DB2 database, cataloging (catalog) The word is difficult to understand, I was in the study of the DB2 is often confused by this catalog, until now I personally feel that the DB2 Catalog (catalog) This term is not very good, in particular, catalogs have cataloging nodes, Catalog database, and so on.

If you want to understand the catalog, let me briefly explain the architecture of the DB2 database, where the largest concept in the DB2 database is the System (node), which is the host, the following is the instance, which is the database, then the table space, then the database object. Now suppose you have a database server on the p570 machine, you have a client on Windows,linux or any platform, you now want to establish a client to the server side of the connection, what is the specific step?

First step:

You have to be able to on the client machine can be the remote server can be recognized, this specific how to do? The cataloging (catalog) method used in DB2, in particular, is to write a remote server in a file on the local client by cataloging:

DB2 catalog TCPIP Node p570 remote 172.10.10.10 server 50000

In the above command, p570 is a node name (must be unique on a machine), and remote is followed by the server's IP address, which is the port number corresponding to the instance on the remote server. DB2 Records remote server information in a local sqlnodir file in this way, so the catalog node actually maps the remote server to the local and can find remote servers and instances through the records in Sqlnodir, similar to the address pointers to remote servers and instances.

Step Two:

When the remote server IP address is cataloged, the second step should be to catalog the database under the instance to the local

DB2 catalog DB remotedb at node p570

In this command, Remotedb is the database under the remote instance, p570 is the node name that we cataloged in the first step

After this command is executed, the remote database information is recorded in the local Sqldbdir file, where the catalog database can be understood to map the database under the remote server instance to a local alias.

The above is the client and server are not on the same machine, is through the catalog node, cataloging the database to achieve the client connected to the server database, if it is connected to the same machine, then do not display the catalog node, but in the server when we create an instance, There is an implied process of cataloging the instance locally, assuming that an instance named Db2inst1 is created on the p570, there is actually an implied

DB2 catalog Local Node Db2inst1 instance db2inst1 system p570 OSType AIX, also when you create a database Db2inst1 under MyDB, there is an implied catalog (Catalo g) The steps of the database:

Steps for DB2 catalog DB mydb at node Db2inst1.

So far you can understand the catalog (catalog), which is the purpose of establishing a client-server database connection locally or remotely.

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.