CATALOG TCPIP/TCPIP4/TCPIP6 NODE command
The CATALOG TCPIP/TCPIP4/TCPIP6 NODE command adds a Transmission Control Protocol/Internet Protocol (TCP/IP) database partition server entry to the node directory. The TCP/IP communications protocol is used to access the remote database partition server. The CATALOG TCPIP/TCPIP4/TCPIP6 NODE command is run on a client.
None. Directory operations affect the local directory only.
- Specifies that a TCP/IP administration server node is to be cataloged. This parameter cannot be specified if the SECURITY SOCKS parameter is specified.
- TCPIP NODE nodename
- The nodename of the TCPIP, TCPIP4, or TCPIP6 database partition server represents a local nickname you can set for the machine that contains the database you want to catalog. Only specify TCPIP4 when specifying an IPv4 IP address, and only specify TCPIP6 when specifying an IPv6 IP address. The maximum length of the nodename is 8 characters.
- REMOTE hostname | IPv4 address | IPv6 address
- The hostname or the IP address of the node where the target database resides. IP address can be an IPv4 or IPv6 address. The hostname is the name of the database partition server that is known to the TCP/IP network. The maximum length of the hostname is 255 characters.
- SERVER service-name | port number
- 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 services file.
This parameter must not be specified for ADMIN nodes, but is mandatory for non-ADMIN nodes. The value on ADMIN nodes is always 523.
- SECURITY SOCKS
- Specifies that the node will be SOCKS-enabled. This parameter is only supported for IPv4. If
CATALOG TCPIP NODE is used and SECURITY SOCKS is specified,
the Db2 database product will use IPv4 to establish the connection. This parameter cannot be
specified if the ADMIN parameter is specified. The following environment variables are mandatory and must be set to enable SOCKS:
- The Domain Name Server for resolving the host address of the SOCKS server. This should be a hostname or IPv4 address.
- The fully qualified hostname or IPv4 address of the SOCKS server. If the SOCKSified IBM® Data Server Client is unable to resolve the fully qualified hostname, it assumes that an IPv4 address has been entered.
- The SOCKS server is reachable via the domain name server.
- The hostname is listed in the hosts file. The location of this file is described in the TCP/IP documentation.
- An IPv4 address is specified.
If this command is issued after a db2start, it is necessary to issue a TERMINATE command to have the command take effect.
- SECURITY SSL
- Specifies that the node is SSL enabled. You cannot specify the SECURITY SSL clause if you also specify the ADMIN parameter.
- REMOTE_INSTANCE instance-name
- Specifies the name of the server instance where the database resides, and to which an attachment or connection 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, and LINUX.
- WITH comment-string
- Describes the database entry in the database directory. Any comment that helps to describe the database 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.
db2 catalog tcpip node db2tcp1 remote hostname server db2inst1
db2 catalog tcpip4 node db2tcp2 remote 126.96.36.199 server db2inst1
This example specifies an IPv4 address. You should not specify an IPv6 address in the CATALOG TCPIP4 NODE command. The catalog will not fail if you do, but a subsequent attach or connect will fail because an invalid address was specified during cataloging.
db2 catalog tcpip6 node db2tcp3 remote 1080:0:0:0:8:800:200C:417A server 50000
This example specifies an IPv6 address and a port number for SERVER. You should not specify an IPv6 address in the CATALOG TCPIP4 NODE command. The catalog will not fail if you do, but a subsequent attach or connect will fail because an invalid address was specified during cataloging.
db2 catalog tcpip node db2tcp4 remote hostname server ssl_port
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.
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.
To get the Db2 database manager to listen on IPv6, the operating system and server must first be configured for IPv6. Speak to your system administrator to ensure this configuration has been done before cataloging an IPv6 TCPIP node. Follow Upgrading to IPv6 with IPv4 configured to see how this can be done on AIX.