IBM Books

DB2 Connect User's Guide


Most Common DB2 Connect Problems

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

Notes:

  1. Refer to your product Quick Beginnings manual and the latest Release Notes for the most up-to-date information about recommended software fix levels.

  2. For message and return code combinations specific to APPC communications, an SNA sense code may also be indicated. At present, any SNA sense code information associated with a particular message must be obtained from the SNA subsystem.

    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.

  3. The term gateway refers to DB2 Connect Enterprise Edition.

SQL0965 or SQL0969

Symptom

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.

Solution

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

SQL1338 During CONNECT

Symptom / Cause

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.

Solutions

  1. Make sure the CPIC Side Information profile name specified in the DB2 Node directory entry matches the SNA configuration (it is case sensitive).

  2. You may need to check PATH and LIBPATH to ensure that the SNA stack that you want to use is referenced first.

SQL1403N During CONNECT

Symptom

SQL1403N The username and/or password supplied is incorrect.

Solution

  1. User fails to authenticate at the DB2 Connect workstation. Determine whether the user is supposed to be authenticated at the DB2 Connect workstation.

    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.

  2. Password not available to send to the target server database. If the system database directory entry is cataloged using AUTHENTICATION DCS, then a password has to be flowed from the DB2 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.

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 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.

Solution

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:

  1. db2 terminate

  2. 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.

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.

SQL30060

Symptom

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

Solution

When connecting to DB2 for MVS or DB2 for OS/390, the Communications Database (CDB) tables have not been updated properly. Refer to:

SQL30061

Symptom

Connecting to the wrong host or AS/400 database server location - no target database can be found.

Solution

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>

SQL30073 with Return Code 119C During CONNECT

Symptom

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.

Solution

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.

SQL30081N with Return Code 1

Symptom

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

Solution(s)

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:

  1. SQL30081N with return code 1 and sna sense code 0877002C
    

    Wrong network name has been specified.

  2. SQL30081N with return code 1 and SNA sense code ffff0003
    

    The wrong MAC address has been specified or the SNA link is not active.

  3. SQL30081N with return code 1 and SNA sense code 10030021
    

    There is an LU type mismatch.

  4. 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:

  1. When creating the Local LU profile, define the LU as the default LU. For example, in the SNA Feature list panel in CM/2, either:

  2. Check that SNA is started on the DB2 Connect gateway

  3. If you are using DB2 for MVS or DB2 for OS/390, check that the Distributed Data Facility (DDF) address space is started and that DB2 is running.

SQL30081N with Return Code 2

Symptom

Message SQL30081N is received with Return Code 2 and SNA Sense Code 08120022.

Solution

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.

SQL30081N with Return Code 9

Symptom

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

Solution

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.

SQL30081N with Return code 10

Symptom

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

Solution

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 with Return Code 20

Symptom

   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

Solution

Ensure that the SNA subsystem is started on the DB2 Connect system.

SQL30081N with Return code 27

Symptom

Message SQL30081N is received with Return Code 27 and SNA Sense Code 800Axxxx.

Solution

The VTAM Path Information Unit (PIU) is too large.

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 gateway. It can also occur when connecting from the DB2 Connect gateway to a host.

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

  2. There may be a mismatch between the TCP/IP service name and/or port number specifications at the DB2 client and the DB2 Connect gateway. Verify the entries in the TCP/IP services files on both machines.

  3. Check that DB2 is started on the DB2 Connect gateway. 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:
       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 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 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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]