Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2044814
  • 博文数量: 519
  • 博客积分: 10070
  • 博客等级: 上将
  • 技术积分: 3985
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-29 14:05
个人简介

只问耕耘

文章分类

全部博文(519)

文章存档

2016年(1)

2013年(5)

2011年(46)

2010年(220)

2009年(51)

2008年(39)

2007年(141)

2006年(16)

我的朋友

分类:

2007-08-20 11:26:43

Adds a Transmission Control Protocol/Internet Protocol (TCP/IP) node entry to the node directory. The TCP/IP communications protocol is used to access the remote node. The CATALOG TCPIP NODE command is run on a client.
Authorization

One of the following:

  • sysadm
  • sysctrl
Required connection

None. Directory operations affect the local directory only.

Command syntax
Read syntax diagram>>-CATALOG--+-------+--TCPIP NODE--nodename--------------------->
'-ADMIN-'

(1)
>--REMOTE--+-hostname---+---------SERVER--service-name---------->
'-IP address-'

>--+----------------+--+--------------------------------+------->
'-SECURITY SOCKS-' '-REMOTE_INSTANCE--instance-name-'

>--+---------------------+--+-------------------------------+--->
'-SYSTEM--system-name-' '-OSTYPE--operating-system-type-'

>--+------------------------+----------------------------------><
'-WITH--"comment-string"-'

Notes:
  1. SERVER must not be specified for ADMIN nodes, but is mandatory for non-ADMIN nodes.
Command parameters
ADMIN>
Specifies that a TCP/IP administration server node is to be cataloged.
NODE nodename
A local alias for the node to be cataloged. This is an arbitrary name on the user's workstation, used to identify the node. It should be a meaningful name to make it easier to remember. The name must conform to database manager naming conventions.
REMOTE hostname/IP address
The host name or the IP address of the node where the target database resides. The host name is the name of the node that is known to the TCP/IP network. The maximum length of the host name is 255 characters.
SERVER service-name
Specifies the service name or the port number of the server database manager instance. The maximum length is 14 characters. This parameter is case sensitive.

If a service name is specified, the services file on the client is used to map the service name to a port number. A service name is specified in the server's database manager configuration file, and the services file on the server is used to map this service name to a port number. The port number on the client and the server must match.

A port number, instead of a service name, can be specified in the database manager configuration file on the server, but this is not recommended. If a port number is specified, no service name needs to be specified in the local TCP/IP services file.

Note:
This parameter must not be specified for ADMIN nodes. The value on ADMIN nodes is always 523.
SECURITY SOCKS
Specifies that the node will be SOCKS-enabled.

The following environment variables are mandatory and must be set to enable SOCKS:

SOCKS_NS
The Domain Name Server for resolving the host address of the SOCKS server. This should be an IP address.
SOCKS_SERVER
The fully qualified host name or the IP address of the SOCKS server. If the SOCKSified DB2 client is unable to resolve the fully qualified host name, it assumes that an IP address has been entered.

One of the following conditions should be true:

  • The SOCKS server should be reachable via the domain name server
  • It should be listed in the hosts file. The location of this file is described in the TCP/IP documentation.
  • It should be in an IP address format.

If this command is issued after a db2start, it is necessary to issue a TERMINATE command to have the command take effect.

REMOTE_INSTANCE instance-name
Specifies the name of the server instance to which an attachment is being made.
SYSTEM system-name
Specifies the DB2 system name that is used to identify the server machine. This is the name of the physical machine, server system, or workstation.
OSTYPE operating-system-type
Specifies the operating system type of the server machine. Valid values are: AIX, WIN, HPUX, SUN, OS390, OS400, VM, VSE, SNI, SCO, and LINUX.
WITH "comment-string"
Describes the node entry in the node directory. Any comment that helps to describe the node can be entered. Maximum length is 30 characters. A carriage return or a line feed character is not permitted. The comment text must be enclosed by single or double quotation marks.
Examples
   db2 catalog tcpip node db2tcp1 remote tcphost server db2inst1
with "A remote TCP/IP node"

db2 catalog tcpip node db2tcp2 remote 9.21.15.235 server db2inst2
with "TCP/IP node using IP address"
Usage notes

The database manager creates the node directory when the first node is cataloged (that is, when the first CATALOG...NODE command is issued). On a Windows client, it stores and maintains the node directory in the instance subdirectory where the client is installed. On an AIX client, it creates the node directory in the DB2 installation directory.

List the contents of the local node directory using the LIST NODE DIRECTORY command.

Note:
If directory caching is enabled, database, node, and DCS directory files are cached in memory. An application's directory cache is created during its first directory lookup. Since the cache is only refreshed when the application modifies any of the directory files, directory changes made by other applications might not be effective until the application has restarted.

To refresh the CLP's directory cache, use the TERMINATE command. To refresh DB2's shared cache, stop (db2stop) and then restart (db2start) the database manager. To refresh the directory cache for another application, stop and then restart that application.

Related reference

This topic can be found in: Command Reference.

阅读(2721) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~