IBM Support

Local Client db2bp may fail in DRDA authentication with SQL1221 error

Technote (troubleshooting)


Local connections may get sql1221 error. The corresponding db2diag.log message will contain SQLZ_RC_CMERR ("External Comm Error") for the db2bp process. The error will be reported by sqljcCommConnect function of the connecting db2bp. This is actually an engine side error when a backend db2agent is not able to allocate a shared memory segment for the ASL heap.


Attempt to connect to database will report a sql1221 as follows:

$ db2 connect to sample
SQL1221N  The Application Support Layer heap cannot be allocated.

The db2diag.log message will look like this:

2010-10-21- I226846E1230 LEVEL: Severe
PID : 12320 TID : 47034096111504PROC : db2bp
INSTANCE: db2inst1 NODE : 000
FUNCTION: DB2 UDB, DRDA Communication Manager, sqljcCommConnect, probe:10
MESSAGE : ZRC=0x81360012=-2127167470=SQLZ_RC_CMERR, SQLT_SQLJC
"External Comm error"
DATA #1 : String, 11 bytes
CCI Error:
DATA #2 : unsigned integer, 8 bytes
[0] 0x00002AC6F69FE95B pdLog + 0xD7
[1] 0x00002AC6F70EB048 _Z16sqljcLogCCIErrorP10sqljCmnMgrPKcP12SQLCC_COND_Thllll + 0x1BC
[2] 0x00002AC6F70E79A4 _Z16sqljcCommConnectP10sqljCmnMgr + 0x146
[3] 0x00002AC6F6A64A6E _Z15sqljcCmnMgrInitP10sqljCmnMgrP17SQLCC_COMHANDLE_TPhmP14db2UCconHandleh + 0x432
[4] 0x00002AC6F7113707 _Z20sqljrCreateTransportP14db2UCconHandle + 0xBB
[5] 0x00002AC6F6A67E40 _Z23sqljrAssociateTransportP14db2UCconHandlePlbP19SQLE_SRVLST_DBENTRYPi + 0x74
[6] 0x00002AC6F7112402 _Z20sqljrInternalConnectP14db2UCconHandlePbPib + 0xF8
[7] 0x00002AC6F7113608 _Z30sqljrFindBestAddressAndConnectP14db2UCconHandle + 0x5C
[8] 0x00002AC6F710EE06 _Z23sqljrDrdaArAuthenticateP14db2UCinterfacelPj + 0x5F0
[9] 0x00002AC6F6FE1A44 _Z20sqlexAppAuthenticateP14db2UCinterface + 0x534


The local connect attempt will use a db2bp. This db2bp needs to use a shared memory segment for ipc communication to the local db2agent. The db2ipccm agent will create this segment. If this shared memory segment cannot be created then the db2ipccm will encounter an error and not be able to complete the connection with the db2bp. This backend error will not flow to the db2bp and the db2bp will only report a "External Comm Error" or SQLC_RC_CMERR.


Local client connecting to Unix servers or any server using shared memory for local connections.

Diagnosing the problem

For a complete diagnosis we should trace sqlccGetIPCs and sqlogmshr using this command:

db2trc on -m "*.*.*.sqlccGetIPCs,sqlogmshr.*"

Resolving the problem

Insure that kernel parameters are set to allow the required shared memory utilization. In particular SHMALL, which limits the total allowable shared memory pages, must be high enough. Also insure that there is enough memory available on the system to create additional shared memory segments.

Related information

Modifying kernel parameters (Linux)

Document information

More support for: DB2 for Linux, UNIX and Windows
Connectivity - DRDA

Software version: 9.1, 9.5, 9.7, 10.1, 10.5, 11.1

Operating system(s): Linux

Software edition: Enterprise Server

Reference #: 1450885

Modified date: 22 July 2017

Translate this page: