原文地址:http://king123654789.iteye.com/blog/1296492
Catalog 是远程连接部署在服务器端的DB2数据库的命令
【本文涉及到的命令】
- >db2 catalog tcpip node
- >db2 catalog database aabb80001 as aa80g2dt at node aa80g2dt
- >db2 lsit node directory
【Catalog浅析】
命令:db2 catalog tcpip node db2_node remote host_name server service_port
例如:
浅析:
- db2_node 是由你任意起的一个结点名,结点名不能跟已有的结点名重复(可通过db2 lsit node directory查看 )
- host_name 也可为IP address
- service_port 端口号
命令:db2 catalog database db_name as alias_name at node db2_node
例如:db2 catalog database aabb80001 as aa80g2dt at node aa80g2dt
浅析:
- db_name是指远程数据库的名字
- alias_name是客户端实例名
- db2_node是指上一步(db2 catalog tcpip node db2_node remote host_name server service_port)上面你所指定的db2_node
命令:db2 lsit node directory
浅析:
- 列出所有Catalog的节点名db2_node,执行结果例如: