Troubleshooting
Problem
When a user that is logged in as super user (su) attempts to run Db2 commands against several Db2 instance users within the same command line processor (CLP) session, the error DB21016E is sometimes returned for one of the commands. This issue occurs on AIX systems running the KornShell (ksh).
Symptom
DB21016E The Command Line Processor encountered a system error while sending the command to the backend process.
Cause
When using su to execute Db2 commands for different user instances, their respective uid%8 (uid MOD 8) values must be unique. Otherwise the DB21016E error is thrown.
Diagnosing The Problem
Db2 traces collected during the incident have the following trace point:
errtrans DB2 UDB oper system services sqlowqueInternal fnc
(13.3.15.1014.0.40)
pid 7667932 tid 1 cpid -1 node -1 probe 40
Error Translation
Original Error OSERRNO = 13
New Error ZRC = 0x870F00BB = -2029059909 =
SQLO_QUE_NO_ACCESS
1895 data DB2 UDB RAS/PD component pdLogInternal fnc
(3.3.134.9.0.130)
pid 7667932 tid 1 cpid -1 node -1 probe 130
bytes 120
Data1 (PD_TYPE_BITMASK,8) Bitmask:
0x0000000000000002
Data2 (PD_TYPE_ECFID,4) Function:
DB2 UDB, oper system services, sqlowqueInternal
Data3 (PD_TYPE_HEXINT,8) Hex integer:
0xFFFFFFFF870F00BB
Data4 (PD_TYPE_ECFID,4) Function:
OS, -, msgsnd
Data5 (PD_TYPE_HEXINT,8) Hex integer:
0x000000000000000D
Data6 (PD_TYPE_UINT,8) unsigned integer:
40
Data7 (PD_TYPE_UINT,8) unsigned integer:
2
Data8 (PD_TYPE_UINT,8) unsigned integer:
4
Also, the db2diag.log file contains results similar to the following:
2015-04-01-10.21.57.255102-240 E124974A660 LEVEL: Error
(OS)
PID : 7667932 TID : 1 PROC : db2
INSTANCE: db2inst1 NODE : 000
HOSTNAME: localhost
EDUID : 1
FUNCTION: DB2 UDB, oper system services, sqlowqueInternal,
probe:40
MESSAGE : ZRC=0x870F00BB=-2029059909=SQLO_QUE_NO_ACCESS
"do not have the access right"
CALLED : OS, -, msgsnd
OSERR : EACCES (13) "The file access permissions do not allow
the specified action."
DATA #1 : system V message queue identifier.,
PD_TYPE_SYSV_QUEUE_ID, 4 bytes
0x00300004
DATA #2 : Pointer, 8 bytes
0x09001000a081d3d8
DATA #3 : unsigned integer, 8 bytes
1
This issue is not the result of users being incorrectly defined, or any access issues. It is the result of the CLP attempting to read a queue that belongs to a different user.
In addition, the UID of the two instance users should have the same UID%8 value.
Resolving The Problem
There are two solutions to this issue:
- Ensure that the UID values being used in the su command do not evaluate to the same values for UID%8.
- Run the Db2 commands as a script within the su command.
For Example:
su - <user> -c "./script.sh"
where script.sh contains multiple Db2 commands:
db2 connect to sample;
db2 select * from <table>;
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PmTAAU","label":"Programming Interface->CLP"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"11.5.6;and future releases"}]
Was this topic helpful?
Document Information
Modified date:
18 October 2021
UID
ibm16495421