IBM Support

DB2 Audit operations may fail with DIA8506C error in db2diag.log

Troubleshooting


Problem

db2diag.log contains various errors such as 'DIA8506C Unexpected end of file was reached' or 'Unexpected System Error' or RETCODE such as 'ZRC=0x870F0009' 'ZRC=0x875C00CD' or sqlcode: -1042

Symptom


Scenario A: SQL1042 when connecting to database

Attempting to connect to database fails with SQL1042. db2diag.log shows SQLO_EOF from the function sqlexAuditOpenAdjust (db2audit attempting to open audit log file)

2020-01-01-14.05.33.948336-240 E66189574A497 LEVEL: Event
...
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:1000
START : DATABASE: sample : ACTIVATED: NO

2020-01-01-14.05.33.962354-240 I66190072A658 LEVEL: Error
...
FUNCTION: DB2 UDB, bsu security, sqlexAuditOpenAdjust, probe:149
RETCODE : ZRC=0x870F0009=-2029060087=SQLO_EOF "the data does not exist"
DIA8506C Unexpected end of file was reached.
DATA #1 : Hexdump, 4 bytes
0x0A000000037F4880 : 870F 0009 ...

2020-01-01-14.05.33.963161-240 I66190731A583 LEVEL: Error
...
FUNCTION: DB2 UDB, bsu security, sqlexAuditWriteBufferToDisk, probe:15506
MESSAGE : ZRC=0x875C00CD=-2024013619=SQLEX_UNEXPECTED_SYSERR
"Unexpected System Error"

DATA #1 : Hex integer, 4 bytes
0x40000011


Scenario B: DB2 attempts to audit

The following messages can be seen in db2diag.log when DB2 attempts to audit.

2013-11-08-00.08.39.394606-300 I2075E629 LEVEL: Error
PID : 27045 TID : 46913005021504 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000 DB : FOO
APPHDL : 0-33 APPID: *LOCAL.db2inst1.131108050839
HOSTNAME: db2host
EDUID : 18 EDUNAME: db2agent (FOO)
FUNCTION: DB2 UDB, bsu security, sqlexAuditOpenAdjust, probe:149
RETCODE : ZRC=0x870F0009=-2029060087=SQLO_EOF "the data does not exist"
DIA8506C Unexpected end of file was reached.
DATA #1 : Hexdump, 4 bytes
0x00002AAAC8FFB380 : 0900 0F87 ....

2013-11-08-00.08.39.473542-300 I2705E554 LEVEL: Error
PID : 27045 TID : 46913005021504 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000 DB : FOO
APPHDL : 0-33 APPID: *LOCAL.db2inst1.131108050839
HOSTNAME: db2host
EDUID : 18 EDUNAME: db2agent (FOO)
FUNCTION: DB2 UDB, bsu security, sqlexAuditWriteBufferToDisk, probe:14164
MESSAGE : ZRC=0x875C00CD=-2024013619=SQLEX_UNEXPECTED_SYSERR
"Unexpected System Error"
DATA #1 : Hex integer, 4 bytes
0x40000011

...

2013-11-08-00.08.39.474498-300 I4308E930 LEVEL: Error
PID : 27045 TID : 46913005021504 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000 DB : FOO
APPHDL : 0-33 APPID: *LOCAL.db2inst1.131108050839
HOSTNAME: db2host
EDUID : 18 EDUNAME: db2agent (FOO)
FUNCTION: DB2 UDB, bsu security, sqlexAuditData::logEvent, probe:1089
MESSAGE : ZRC=0x875C00CD=-2024013619=SQLEX_UNEXPECTED_SYSERR
"Unexpected System Error"
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -1042 sqlerrml: 3
sqlerrmc: 205
sqlerrp : SQLEXADT
sqlerrd : (1) 0x875C00CD (2) 0x000000CD (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"DB2 Tools - Troubleshooting","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.8;9.7;9.5;10.1;10.5;11.1","Edition":"Advanced Enterprise Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
01 May 2025

UID

swg21655610