db2 catalog tcpip
node mynode //"mynode" is an arbitrary name chosen for the node
remote xxx.xxx.xxx.xxx // host name or IP addr of remote
server 50000 //50000:the port used for DB2
以上是编目远程节点,用英文注释是为了表达明确
db2 catalog db mydbname //"mydbname" is the name of database you want
// to access in remote machine
at node mynode
以上是编目数据库
db2 terminate
db2 connect to mydbname
user <username>
using <password>