Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Identify the communication parameter values for the remote database server.
You need to update the hosts file if you want to establish a connection to the remote database
server using its hostname and your network does not contain a DNS (domain name server) that can
be used to resolve that hostname to an IP address.
To update the hosts file on the client to resolve the remote server's hostname to its IP address:
Add an entry to the hosts file for the server's IP address. For example:
Where:
• To update the services file on the client to resolve a service name to the remote server's port
number:
1. Using a text editor, add the Connection Service name and port number to the services file.
For example:
Where:
3. Catalog the server node from the client. Instructions are provided for each
communications protocol:
Cataloging a TCP/IP node adds an entry to the DB2® client's node directory that describes
the remote node. This entry specifies the chosen alias (node_name), the hostname (or
ip_address), and the svcename (or port_number) that the client uses to access the remote
host.
You must have System Administrative (SYSADM) or System Controller (SYSCTRL) authority.
You cannot catalog a node using root authority.
Procedure:
1. Log on to the system as a user with System Administrative (SYSADM) or System Controller (SYSCTRL)
authority.
2. Catalog the node by entering the following commands in the command line processor:
Where:
• nodename represents a local nickname you can set for the machine that has the
database you want to catalog.
• remote_instance represents the name of the server instance on which the database
resides.
• system_name represents the DB2 system name that is used to identify the server. This
is the name of the physical machine, server system, or workstation
• os_type represents the operating system type of the server machine. Valid values are:
AIX, WIN, HPUX, SUN, OS390, OS400, VM, VSE, and LINUX.
Note:
• The terminate command is needed to refresh the directory cache.
• Although remote_instance, system, and ostype are optional, they are required for users
who want to use the DB2 tools.
• The service_name used on the client does not have to be the same as the one on the
server. However, the port numbers that they map to must match
• While not shown here, the catalog tcpip node command provides the option to
explicitly specify the version of IP, namely IPv4 or IPv6.
Example:
To catalog a node that you want to call db2node on a remote server myserver.ibm.com that is using port
number 50000, you would enter the following from a db2 prompt:
db2 => catalog tcpip node db2node remote myserver server 50000
DB20000I The CATALOG TCPIP NODE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.
db2 => terminate
DB20000I The TERMINATE command completed successfully.
• You require a valid DB2 user ID. DB2 does not support using root authority to catalog a database.
• You must have System Administrative (SYSADM) or System Controller (SYSCTRL) authority, or have
the catalog_noauth option set to ON.
• You need the following information when cataloging a remote database:
o Database name
o Database alias
o Node name
o Authentication type (optional)
o Comment (optional)
Catalog the database by entering the following commands in the command line processor: