DB2 Catalog浅析&学习笔记

原文地址:http://king123654789.iteye.com/blog/1296492

Catalog 是远程连接部署在服务器端DB2数据库的命令

 

【本文涉及到的命令】

  • >db2 catalog tcpip node aa80g2dt remote data001.dalian.china.sunf.com server 3099
  • >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 catalog tcpip node aa80g2dt remote a02b07.dalian.china.sunf.com server 3099

浅析:

  • 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,执行结果例如:

 

posted @ 2018-04-13 15:34  怎么著都不成  阅读(687)  评论(0编辑  收藏  举报