In this environment, the clients connect to a gateway with DB2 Connect Enterprise Edition installed. The gateway serves as a DRDA application requester to the host. In our example, we used the workstation of CLIENT1, with only the client application enabler installed, to connect to the host via the DB2 connect gateway of SERVER1.
Refer to the Configure TCP/IP for DB2 UDB for OS/390 from the above section.
To accept incoming clients, the necessary protocols have to be started first. Normally, you configure these protocols with the installation of DB2 Connect. The most common protocol used is TCP/IP, so we document only the usage of TCP/IP between the client and the server. Protocols are started during the start of DB2. The following are automatically configured (if, during installation of DB2 Connect, you configured TCP/IP) for you to accept incoming clients.
You can always configure TCP/IP after installation of DB2 Connect by doing the following:
Update the DB2COMM registry value to include TCP/IP:
db2set DB2COMM=TCPIP
You can check your DB2COMM value with:
db2set ?all
Update the services file on c:\winnt\system32\drivers\etc. The following port should be there. You can choose any available port number and name. The default port is 50000.
db2cDB2 50000/tcp #connection port for the DB2 instance DB2
Update the service name (SVCENAME) parameter in the database manager configuration file:
db2 update dbm cfg using svcename db2cDB2
NOTE
The service name is case-sensitive.
Stop and restart the database instance.
From the DB2 client, you can use the Client Configuration Assistant or the command line processor to configure your access to the DB2 host subsystem:
Log on to the system with a valid DB2 user ID.
Start the Configuration Assistant using the db2ca command.
Search for servers.
Test the connection using Configuration Assistant.
or
Catalog the TCP/IP node on the DB2 client:
db2 catalog tcpip node node_name remote hostname server service_name db2 catalog tcpip node nserver1 remote 192.168.1.51 server 50000
Catalog the database on the DB2 client:
db2 catalog database database_name as database_alias at node node_name db2 catalog database db2t as db2t at node nserver1
Test the client-server connection:
db2 connect to db2t user os390id db2 "select * from sysibm.sysdummy1" db2 terminate