Common DB2 Connect problems

 

This topic lists the most common symptoms of connection problems encountered when using DB2 Connect™. In each case, you are provided with:

SQL0965 or SQL0969

Symptom

Messages SQL0965 and SQL0969 can be issued with a number of different return codes from DB2® for i5/OS™, DB2 for z/OS®, and DB2 for VM & VSE.

When you encounter either message, you should look up the original SQL code in the documentation for the database server product issuing the message.

Solution

The SQL code received from the host or i5/OS database cannot be translated. Correct the problem, based on the error code, then resubmit the failing command.

SQL5043N

Symptom

Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully.

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.

Solution

This warning is a symptom which signals that DB2 Connect, acting as a server for remote clients, is having trouble handling one or more client communication protocols. These protocols can be TCP/IP and others, and usually the message indicates that one of the communications protocols defined to DB2 Connect is not configured properly.

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

SQL30020

Symptom

SQL30020N Execution failed because of a Distributed Protocol Error that will affect the successful execution of subsequent commands and SQL statements.

Solutions

Service should be contacted with this error. Run the db2support command before contacting service.

SQL30060

Symptom

SQL30060N "<authorization-ID>" does not have the privilege to perform operation "<operation>".

Solution

When connecting to DB2 for OS/390® and z/OS, the Communications Database (CDB) tables have not been updated properly.

SQL30061

Symptom

Connecting to the wrong host or System i database server location - no target database can be found.

Solution

The wrong server database name might be specified in the DCS directory entry. When this occurs, SQLCODE -30061 is returned to the application.

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 server
To connect to the database you then issue:

   db2 connect to <alias> user <user_name> using <password>

SQL30081N with Return Code 79

Symptom

   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

Solution(s)

This error can occur in the case of a remote client failing to connect to a DB2 Connect server. It can also occur when connecting from the DB2 Connect server to a host or System i database server.

  1. The DB2COMM profile variable might be set incorrectly on the DB2 Connect server. Check this. For example, the command db2set db2comm=tcpip should appear in sqllib/db2profile when running DB2 Enterprise Server Edition on AIX®.

  2. There might be a mismatch between the TCP/IP service name and port number specifications at the IBM® data server client and the DB2 Connect server. Verify the entries in the TCP/IP services files on both machines.

  3. Check that DB2 is started on the DB2 Connect server. Set the Database Manager Configuration diaglevel to 4, using the command:

       db2 update dbm cfg using diaglevel 4
    After 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 with Protocol Specific Error Code 10032

Symptom

   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

Solution

This error message might be received when trying to disconnect from a machine where TCP/IP communications have already failed. Correct the problem with the TCP/IP subsystem.

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.

SQL30082 RC=24 During CONNECT

Symptom

SQLCODE -30082 The username or the password supplied is incorrect.

Solution

Ensure that the correct password is provided on the CONNECT statement if necessary. Password not available to send to the target server database. A password has to be sent from the IBM data server client to the target server database. On certain platforms, for example AIX, the password can only be obtained if it is provided on the CONNECT statement.