This article mainly tells you about the correct use scheme of IBM DB2 Catalog and the analysis of its actual operation scheme. In actual operation, I have been listening to others to let the database catalog on the Server go down, at first, I couldn't understand what he was talking about. At the beginning, I was quite confused. Why did catalog do?
Go to the Internet and check google and baidu. When I first started reading it, I talked about Alibaba Cloud. Finally, I checked the official DB2 documents to find out what was going on. Here, by the way, we will share with you!
Chinese people immediately wanted to translate catalog into Chinese, but they couldn't find the right word. So they simply translated it into "cataloguing" and said that the names of people were not good, it seems that translation is still a problem, but it doesn't matter. Everyone is used to it. I don't think it's actually better to understand it. I think it's a db2 command, load the information about your database on the server to your local PC, hoho ~~).
Why?
The deployed database must have been installed on the server. At least a few people have installed the Database on their personal computers for use.) The database may be in another city, you want to operate the database and view the remote information about the database, so we need to connect to the remote database.
It is not enough. You must be able to "get" remote database information locally. In the graphic interface, you can click a few buttons through Configuration Asistant. However, if you want to change your proffessional, you need to make your catalog debut. Remember, here, you only need to understand it as a command, which is also a DB2 command. This name is IBM DB2 catalog, rather than trying to translate it into Chinese.
What should I do?
Using catalog to load remote database information to a local machine is generally divided into two steps:
Step 1: run the following command on the node of the catalog server:
- db2 catalog tcpip node db2node remote hostname server service_port
In this example, db2node is the name of any node that you initiate. You can use db2 lsit node directory to check if the name cannot be repeated with the existing name. The hostname can also be IP address, and service_port is the port number. The node directory stores all the connectivity information of the remote database.
Step 2: The catalog remote DB2 database command is as follows:
- db2 catalog database db_name as alias_name at node db2node.
Db_name refers to the name of the remote database, alias_name refers to the client Instance name, And db2node refers to the node you specified above!
Now that the communication has been established, you can connect to the database ~
The above content is a description of the use and analysis of the IBM DB2 Catalog, hoping to help you in this regard.