Learning Visually with Examples [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Learning Visually with Examples [Electronic resources] - نسخه متنی

Raul F. Chong, Clara Liu, Sylvia F. Qi, Dwaine R. Snow

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










Diagnosing Client-Server TCP/IP Connection Problems


SQL30081N Communication error and

SQL1013N Database not found are the most common connection errors. If either of these errors occurs, you need to verify the server and client configurations.

  • On the server, verify that the DB2 instance is properly set up to accept client connections.

  • On the client, verify that the node directory, database directory, and in the case of a host connection, the DCS directory, are set up correctly.


F.0.1. Verifying the Server Configuration


At the database server, follow this procedure to verify its configuration.


1.

Verify that the database exists by issuing one of the following commands at the server:


list db directory

or


list db directory show detail

Figure F.2 shows the output for the

list db directory command.

Figure F.2. Verifying that a database exists on the server

Figure F.2 confirms that the SAMPLE database resides locally on this server since the

Directory entry type field has a value of

Indirect . If the database resides on a different server, this field would have a value of

Remote , which is not what you would want to see.

2.

Check the DB2COMM registry variable to verify that the correct communication protocol is specified by using the

db2set all command (see Figure F.3).

Figure F.3. Checking the DB2COMM registry variable on the server

Figure F.3 shows that DB2COMM is set to TCPIP; therefore, the server is ready to listen for TCP/IP requests.

3.

Verify that the appropriate configuration parameters are set in the Database Manager Configuration file. Issue the

get dbm cfg command and examine the following.

  • If DB2COMM=TCPIP, then SVCENAME must be set.

  • If DB2COMM=NETBIOS, then NNAME must be set.


In Figure F.4, you can see that the SVCENAME is set to a service name, db2c_DB2.

Figure F.4. Verifying that SVCENAME or NNAME is correctly set on the server

[View full size image]


If SVCENAME is set to a service name instead of a port number, confirm that the value listed there is mapped to a unique port number in the operating system's services file. For example:


db2c_DB2 50000/tcp # Connection port for DB2 instance db2inst1

If this line is not already in the services file, use a text editor to add it.

After you have made sure that you can connect locally on the server and that the server is set up correctly to accept client connections, verify the client configuration.

F.0.2. Verifying the Client Configuration


At the client, follow these steps to verify its configuration.


1.

Verify that the server connectivity information has been correctly entered in the node directory by using the

list node directory command.

The service name in the client's node directory is a port number that matches the port number referenced by the SVCENAME on the server. For example, the SVCENAME on the server is set to

db2c_DB2 , as shown in Figure F.4, and as we saw, this mapped to port 50000 in the server's services file. Therefore, the client needs to specify port 50000 in the node directory, as shown in Figure F.5.

Figure F.5. Checking the node directory on a client

[View full size image]

Alternatively, the client can specify a service name instead of the port number in the node directory. However, this service name is to be defined at the client services file, not the server services file. For example, the node directory can have the service name

db2conn . If this is the case, then in the client's services file, you must set

db2conn to 50000:


db2conn 50000/tcp

2.

Verify that you can ping the host name exactly as it appears in the node directory. If you cannot, that means there is problem connecting to the server. Try to ping the IP address of the server. If that works, then recatalog the node using the IP address instead of the host name and try again.

To recatalog the node directory, you need to first uncatalog the existing node:


uncatalog node

nodename

3.

Even if the client can reach the server, it does not necessarily mean that the client can access the port to connect to databases on the server. Sometimes, for security reasons, the server port is not open to client connections, or the port is not enabled at all. To test if a port is accessible, you can telnet to the port as follows:


telnet

hostname or ip address

50000

alias in the server's database directory (see Figure F.6).

Figure F.6. Verifying that the database name in the client database directory matches the database alias on the server

If the database resides on a host server, verify the DCS directory. Using the

list dcs directory command, ensure that the database name in the database directory matches the database name in the DCS directory (see Figure F.7). The target database name in the DCS directory must be the Location name if the host server is DB2 for z/OS and OS/390, or the RDB name if the host server is DB2 for iSeries.

Figure F.7. Verifying that the database name in the database directory matches the database name in the DCS directory

[View full size image]


Figure F.8 displays a flowchart for diagnosing client-server connectivity problems. It summarizes what we have discussed so far. The client is a DB2 client; the server can be either a DB2 UDB server or a DB2 Connect gateway.

Figure F.8. Diagnostic flowchart for client-server connectivity problems

[View full size image]

Figure F.9 displays a flowchart for diagnosing client-host connectivity problems.

Figure F.9. Diagnostic path for client-host connection problems

Chapter 6).


/ 312