Section 6.5. Case Study


6.5. Case Study

You have just installed DB2 Connect Enterprise Edition on an AIX machine. You will use this machine as a DB2 Connect gateway for DB2 clients connecting to your company's DB2 for z/OS server.

You are given the following information by the database administrator (DBA) of the host database:

 Hostname        = jupiter.myacme.com Port Number     = 446 Location Name   = OS390L1 User ID         = user1 Password        = userpwd 

For security reasons, the DB2 for z/OS location name is not to be exposed to the DB2 clients. The clients will refer to the host database using the name DB2PROD.

When you installed DB2 Connect, an instance db2inst1 was created. Now you will perform the following steps to set up this three-tier connection. All steps are performed while logged on as db2inst1.

Step 1: Configure the DB2 Connect Gateway Machine

Use the information given by the DB2 for z/OS database administrator to catalog the node directory, system database directory, and the DCS directory on the DB2 Connect gateway:

 catalog tcpip node node1 remote jupiter.myacme.com server 446 catalog db db2prod at node node1 catalog dcs db db2prod as os390l1 terminate 

Step 2: Test the Connection from the DB2 Connect Gateway Machine to the Host

Use the following DB2 command to connect to the host database:

 CONNECT TO db2prod USER user1 USING userpwd 

If the connection fails, the problem could be that:

  • The user ID or password is incorrect.

  • There is a network problem.

  • The host server is not set up properly to accept client connections.

As the problem is likely to be on the host side, contact your host's DBA first to investigate the problem before moving on to step 3.

Step 3: Enable the TCP/IP Listener on the Gateway Machine

To make this gateway machine capable of accepting client connections, you need to enable the TCP/IP listener for the db2inst1 instance. If you created the db2inst1 instance using the DB2 Setup Wizard during product installation, you do not need to perform this step because it has already been done for you. However, since you created db2inst1 manually using the db2icrt command, you need to perform the following steps to enable the TCP/IP listener.

1.

Manually add the following entry in the etc/services file:

 db2conn1 50000/tcp #DB2 connection port for db2inst1 

2.

Execute the following DB2 commands:

 update dbm cfg using svcename db2conn1 db2set DB2COMM=TCPIP db2stop db2start 

Step 4: Configure a DB2 Client to Connect to the Host via the Gateway

The DB2 client will connect to the host database via the DB2 Connect gateway. On the client, perform the following commands to catalog the client's node directory and database directory to connect to the gateway. The host name of the gateway is mercury.myacme.com.

 catalog tcpip node node1 remote mercury.myacme.com server 50000 catalog db db2prod at node node1 terminate 

To connect to the host from the client, execute:

 CONNECT TO db2prod USER user1 USING userpwd 

If the connection is successful, proceed to the next step to configure other clients.

Step 5: Configure the Rest of the Clients Using a Client Profile

You need to configure 100 more DB2 clients. You could perform step 4 on all 100 clients, or you can export the catalog information on the client you have just configured and use this profile to configure other clients. Of course, the second option is the faster way.

Since the client is an AIX client without X-Windows installed, you cannot export the client profile using the Configuration Assistant. Therefore, you decide to use the db2cfexp and db2cfimp commands instead.

On the client that has been configured in step 4, export its catalog information into an access profile accessprofile under the /tmp directory:

 db2cfexp /tmp/accessprofile TEMPLATE 

FTP the accessprofile file to the other clients, and on each of them execute:

 db2cfimp accessprofile 



Understanding DB2(R. Learning Visually with Examples)
Understanding DB2: Learning Visually with Examples (2nd Edition)
ISBN: 0131580183
EAN: 2147483647
Year: 2004
Pages: 313

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net