This section lists the most common symptoms of connection problems encountered when using DB2 Connect. In each case, you are provided with:
Notes:
Sometimes SNA sense codes can be viewed by looking through system logs. Whether this is the case or not depends on the SNA subsystem being used, and in some situations you may have to recreate the problem with an SNA trace active in order to obtain the sense code information.
Messages SQL0965 and SQL0969 can be issued with a number of different return codes from DB2 Universal Database for AS/400, DB2 Universal Database for OS/390, DB2 for MVS/ESA, 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.
The SQL code received from the host database cannot be translated. Correct the problem, based on the error code, then resubmit the failing command.
The symbolic destination name was not defined, or it is not properly defined.
For example, this can happen when an APPC node is used and the symbolic destination name specified in the DB2 node directory does not match a CPI-C entry in the local APPC communications subsystem configuration.
Another cause can be that there is more than one SNA stack installed on your machine. You may need to check PATH and LIBPATH to ensure that the stack you want to use is referenced first.
SQL1403N The username and/or password supplied is incorrect.
If yes, make sure that the correct password is provided on the CONNECT statement if necessary.
If no, the system database directory entry must have been incorrectly cataloged using AUTHENTICATION SERVER (this is the default if AUTHENTICATION is not specified explicitly). If this is the case, then recatalog the entry using AUTHENTICATION DCS or CLIENT.
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 gateway. There may have been a successful client connection previously.
If diaglevel = 4, then db2diag.log may contain a similar entry, for example:
1997-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.
This warning is a symptom which signals that DB2 Connect, acting as a gateway for remote clients, is having trouble handling one or more client communication protocols. These protocols can be TCP/IP, APPC and others, and usually the message indicates that one of the communications protocols defined to DB2 Connect is not configured properly.
Often the cause may 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, nname, or tpname).
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 may still appear to exist on the client, and it may become possible to restore the connection without further intervention by issuing the commands shown below.
Most likely, one of the clients connecting to the gateway still has a handle on the TCP/IP port. On each client machine that is connected to the gateway:
SQL30020N Execution failed because of a Distributed Protocol Error that will affect the successful execution of subsequent commands and SQL statements.
Service should be contacted with this error.
Check the db2dump directory for an ffdc dump (pid.000). Then, format this dump file with db2fdump and look in the result file for "ERROR". An MVS ABEND may be listed here. In this case check the MVS console for further information, and look up the abend code in the DB2 for MVS Messages and Codes manual.
SQL30060N "<authorization-ID>" does not have the privilege to perform operation "<operation>".
When connecting to DB2 for MVS or DB2 for OS/390, the Communications Database (CDB) tables have not been updated properly. Refer to:
Connecting to the wrong host or AS/400 database server location - no target database can be found.
The wrong server database name may 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 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. See also The Database Concept, and Updating Database Directories.
Your DB2 Connect Quick Beginnings manual also contains examples showing how to update the DB2 catalogs. See the "Update the DB2 Directories" section in each chapter describing SNA configuration, or see the "Configuring Host and AS/400 Databases for DB2 Connect" chapter, and the "Configuring the TCP/IP Connection" section.
The correct commands for an APPC or APPN node are:
db2 catalog appc node <node_name> remote <sym_dest_name> security program db2 catalog dcs database <local_name> as <real_db_name> db2 catalog database <local_name> as <alias> at node <node_name> authentication dcs
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 dcs
To connect to the database you then issue:
db2 connect to <alias> user <user_name> using <password>
Message SQL30073 is issued with return code 119C. This happens when the target server database does not support the code page used by the DB2 client (going through DB2 Connect). The code page is derived from the configuration of the operating environment in which the DB2 client is running.
See the Administration Guide for further information.
This problem can often be resolved by installing a fix at the target server database system. Contact the appropriate service organization and obtain and apply any fix which might be recommend for this symptom.
As a temporary workaround, the user can override the default code page by setting the DB2CODEPAGE environment variable. Check the locale or set DB2CODEPAGE=850.
On UNIX platforms, the user may be able to switch to a different code page by setting the LANG environment variable to a different value.
Symptom is the following message plus an SNA sense code:
db2 connect to <database name> user <userid> Enter password for <userid>: SQL30081N A communication error has been detected. Communication protocol being used: "APPC". Communication API being used: "CPI-C". Location where the error was detected: "". Communication function detecting the error: "cmallc". Protocol specific error code(s): "1", "*", "0x10030021". SQLSTATE=08001
In this sample the sense code is 10030021.
The most common sense codes associated with this error message, and the suggested solution in each case, are as follows:
SQL30081N with return code 1 and sna sense code 0877002C
Wrong network name has been specified.
SQL30081N with return code 1 and SNA sense code ffff0003
The wrong MAC address has been specified or the SNA link is not active.
SQL30081N with return code 1 and SNA sense code 10030021
There is an LU type mismatch.
SQL30081N with return code 1 and SNA sense code 084B6031
The MAXDBAT in DSNZPARM (at a DB2 for MVS or DB2 for OS/390 host) is set to 0
Other suggestions:
Message SQL30081N is received with Return Code 2 and SNA Sense Code 08120022.
The NUMILU parameter at the NCP (host end of the link) may be set to the default (0). Check this. Modify the NCP definition if necessary before retrying, after putting the change into effect.
Symptom is the following message (the SNA sense code is not required in this case):
db2 connect to <database> user <userid> SQL30081N A communication error has been detected. Communication protocol being used: "APPC". Communication API being used: "CPI-C". Location where the error was detected: "". Communication function detecting the error: "cmsend". Protocol specific error code(s): "9", "*", "0x10086021". SQLSTATE=08001
The problem is that the Transaction Program name (TPNAME) is not defined correctly on the DB2 Connect system. For example, you may have updated your SNA configuration, but not yet verified it at the DB2 Connect gateway. Refer to the DB2 Connect Enterprise Edition for OS/2 and Windows NT Quick Beginnings, or DB2 Connect Personal Edition Quick Beginnings manual for further details.
Symptom is the following message (the SNA sense code is not required):
SQL30081N A communication error has been detected. Communication protocol being used: "APPC". Communication API being used: "CPI-C". Location where the error was detected: "". Communication function detecting the error: "cmrcv". Protocol specific error code(s): "10", "*", "*". SQLSTATE=08001
Check to make sure that DB2 is correctly installed.
If you are using a DB2 Connect for OS/2 gateway, you may see the following if the TP name is not defined properly:
Protocol specific error code(s): "10", "*", "0x084C0000". SQLSTATE=08001
For example, in CM/2, in this case it should be defined as follows:
Transaction program name = 'tpname' (user defined) OS/2 program path and file name = notused
and (on the next CM/2 configuration screen)
Presentation type - background Operation type - Queued, operator preloaded
SQL30081N A communication error has been detected. Communication protocol being used: "APPC". Communication API being used: "CPI-C". Location where the error was detected: "". Communication function detecting the error: "xcstp". Protocol specific error code(s): "20", "*", "*". SQLSTATE=08001
Ensure that the SNA subsystem is started on the DB2 Connect system.
Message SQL30081N is received with Return Code 27 and SNA Sense Code 800Axxxx.
The VTAM Path Information Unit (PIU) is too large.
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
This error can occur in the case of a remote client failing to connect to a DB2 Connect gateway. It can also occur when connecting from the DB2 Connect gateway to a host.
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:
1998-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
This error message may 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 may be required.