When you encounter either message, you should look up the original SQL code in the documentation for the database server product issuing the message.
Perhaps the TCP/IP protocol is not started on the DB2 Connect server. There might have been a successful client connection previously.
If diaglevel = 4, then db2diag.log might contain a similar entry, for example:2001-05-30-14.09.55.321092 Instance:svtdbm5 Node:000 PID:10296(db2tcpcm) Appid:none common_communication sqlcctcpconnmgr_child Probe:46 DIA3205E Socket address "30090" configured in the TCP/IP services file and required by the TCP/IP server support is being used by another process.
Often the cause might be that the DB2COMM profile variable is not defined, or is defined incorrectly. Generally, the problem is the result of a mismatch between the DB2COMM variable and names defined in the database manager configuration (for example, svcename or nname).
One possible scenario is having a previously successful connection, then getting the SQL5043 error message, while none of the configuration has changed. This could occur using the TCP/IP protocol, when the remote system abnormally terminates the connection for some reason. When this happens, a connection might still appear to exist on the client, and it might become possible to restore the connection without further intervention by issuing the commands shown below.
Most likely, one of the clients connecting to the DB2 Connect server still has a handle on the TCP/IP port. On each client machine that is connected to the DB2 Connect server, enter the following commands:db2 terminate db2stop
Check the DB2 node, database, and DCS directory entries. The target database name field in the DCS directory entry must correspond to the name of the database based on the platform. For example, for a DB2 Universal Database™ for z/OS and OS/390 database, the name to be used should be the same as that used in the Boot Strap Data Set (BSDS) "LOCATION=locname" field, which is also provided in the DSNL004I message (LOCATION=location) when the Distributed Data Facility (DDF) is started.
The correct commands for a TCP/IP node are:db2 catalog tcpip node <node_name> remote <host_name_or_address> server <port_no_or_service_name> db2 catalog dcs database <local_name> as <real_db_name> db2 catalog database <local_name> as <alias> at <node node_name> authentication serverTo connect to the database you then issue:
db2 connect to <alias> user <user_name> using <password>
SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "connect". Protocol specific error code(s): "79", "*", "*". SQLSTATE=08001
db2 update dbm cfg using diaglevel 4After stopping and restarting DB2, look in the db2diag.log file to check that DB2 TCP/IP communications have been started. You should see output similar to the following:
2001-02-03-12.41.04.861119 Instance:svtdbm2 Node:00 PID:86496(db2sysc) Appid:none common_communication sqlcctcp_start_listen Probe:80 DIA3000I "TCPIP" protocol support was successfully started.
SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "9.21.85.159". Communication function detecting the error: "send". Protocol specific error code(s): "10032", "*", "*". SQLSTATE=08001
On most machines, simply restarting the TCP/IP protocol for the machine is the way to correct the problem. Occasionally, recycling the entire machine might be required.