0. Prerequisite
TCP connection must be configured on DB2 server.
1. Catalog the TCP/IP node on the DB2 client side:
Command:db2 catalog tcpip node <nodename> remote <hostname> server<service_name|port>
Sample: db2 catalog tcpip node <nodename> remote 192.168.1.1server 5000
2. Catalog the database on the DB2 client:
Command: db2 catalog database <databasename> as<databasealias> at node <nodename> authentication<auth_value>
Sample:db2 catalog database <databasename> as <databasealias> at node<nodename> authentication server
The <nodename> is the value configured in step 1
3. Verify the client-server connection:
$db2 connect to <databasename> user <username> using<password>
$db2 "select 1 from sysibm.sysdummy1"
$db2 terminate
DB2 command to check current node and database information:
$ db2 list node directory
$ db2 list database directory