Common Db2 Connect problems
There are common symptoms and solutions for connection problems that you can encounter when using Db2 Connect.
- A combination of a message number and a return code (or protocol specific return code) associated with that message. Each message and return code combination has a separate heading, and the headings are ordered by message number, and then by return code.
- A symptom, usually in the form of a sample message listing.
- A suggested solution, indicating the probable cause of the error. In some cases, more than one suggested solution might be provided.
SQL0965 or SQL0969
- Symptom
- Messages SQL0965 and SQL0969 can
be issued with a number of different return codes from IBM®
Db2® for IBM
i, Db2 for z/OS®,
and Db2 Server for VM and
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 IBM mainframe 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.
Ifdiaglevel = 4
, then the db2diag log files 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 following commands.
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 z/OS, the Communications Database (CDB) tables have not been updated properly.
SQL30061
- Symptom
- Connecting to the wrong IBM mainframe 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 for z/OS 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 IBM mainframe database server.
- 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®. - 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.
- Check that Db2 is started on the Db2 Connect
Server. Set the
Database Manager Configuration diaglevel to 4, using the
command:
After stopping and restarting Db2, look in the db2diag log files to check that Db2 TCP/IP communications have been started. You should see output similar to the following one:db2 update dbm cfg using diaglevel 4
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.
- The DB2COMM profile variable might be set incorrectly on the Db2 Connect
Server. Check this. For
example, the command
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. 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.