IBM Support

SQL2038N  A database system error "" occurred during processing.

Troubleshooting


Problem

Hitting SQL2038N error "A database system error "" occurred during processing."

Cause

A likely permission issue.

Diagnosing The Problem

If you experience this error and notice the following message in your db2diag.log:

2014-11-19-20.45.30.596880+000 I113421A583 LEVEL: Error
PID : 57214286 TID : 93553 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-16977 APPID: *LOCAL.db2inst1.141126074102
AUTHID : USER1
EDUID : 93553 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, data protection services, sqlp_AsyncLogReadAPI,
probe:210
DATA #1 : String, 137 bytes
Error: sqlcode -2038, rc -2028994531, hflag2LsnReuse 0
action 1, startLSN 000066355C1A2E29, endLSN 00006643219161D7,
logBufferSize 262144


Look further up in the db2diag.log, and if you see messages like the following:

2014-11-19-18.36.01.264497+000 I72587A470 LEVEL: Error
PID : 57214286 TID : 98436 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-44180 APPID: *LOCAL.db2inst1.141125031347
AUTHID : USER1
EDUID : 98436 EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, data protection services, sqlpgole, probe:2880
MESSAGE : Error 118489300 opening database log extent 1204996:
2014-11-19-18.41.15.909464+000 I73058A1919 LEVEL: Error (OS)
PID : 30016860 TID : 1 PROC : db2flsn
INSTANCE: db2inst1 NODE : 000
EDUID : 1
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED : OS, -, open
OSERR : EACCES (13) "Permission denied"
DATA #1 : String, 167 bytes
A total of 2 analysis will be performed :
- User info
- Path access permission

Target file =
/db/db2inst1/db2data/SAMPLE/db2inst1/NODE0000/SQL00001/SQLOGCTL.LFH.1
DATA #2 : String, 186 bytes
Real user ID of current process = 1441
Effective user ID of current process = 1441
Real group ID of current process = 503
Effective group ID of current process = 503
DATA #3 : String, 41 bytes
current sbrk(0) value: 0x0000000110222080
DATA #4 : String, 360 bytes
Information of each subdirectory leading up to the first inaccessible
one is shown in the format below :
<UID>:<GID>:<permissions> (subdirectories)

0:0:755 (db)
1451:503:755 (db2inst1)
1451:503:755 (db2data)
1451:503:755 (SAMPLE)
1451:503:775 (db2inst1)
1451:503:775 (NODE0000)
1451:503:751 (SQL00001)
1451:503:600 (SQLOGCTL.LFH.1)
CALLSTCK: (Static functions may not be resolved correctly, as they are
resolved to the nearest symbol)
[0] 0x0900000005F9C1C4 pdOSSeLoggingCallback + 0x34
[1] 0x090000000302FDC4 oss_log__FP9OSSLogFacUiN32UlN26iPPc + 0x1C4
[2] 0x09000000030302A0 ossLogSysRC + 0xA0
[3] 0x090000000304EECC ossErrorIOAnalysis__FCPC21OSSErrorAnalysisParam
+ 0xC8C
[4] 0x0900000003050F68 ossErrorAnalysis@AF12_1 + 0x48
[5] 0x09000000128A10FC sqloSystemErrorHandler + 0x3E4
[6] 0x09000000128A2BB0 sqloSystemErrorHandler@glue7DC + 0x1B0
[7] 0x090000001071B588 sqloopenp + 0xBFC
[8] 0x09000000115D9D0C
@67@sqlpgRetrieveLatestLFHRecord__FP16LFH_PARAM_STRUCTPC9SQLP_LFCB +
0xB4
[9] 0x09000000114F5FA0 sqlpgOpenLFH__FPCcT1P8SQLP_LFHP9SQLP_LFCB +
0x1B8

2014-11-19-18.41.15.909923+000 I74978A1919 LEVEL: Error (OS)
PID : 30016860 TID : 1 PROC : db2flsn
INSTANCE: db2inst1 NODE : 000
EDUID : 1
FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100
CALLED : OS, -, open
OSERR : EACCES (13) "Permission denied"
DATA #1 : String, 167 bytes
A total of 2 analysis will be performed :
- User info
- Path access permission
Target file =
/db/db2inst1/db2data/SAMPLE/db2inst1/NODE0000/SQL00001/SQLOGCTL.LFH.2
DATA #2 : String, 186 bytes
Real user ID of current process = 1441
Effective user ID of current process = 1441
Real group ID of current process = 503
Effective group ID of current process = 503
DATA #3 : String, 41 bytes
current sbrk(0) value: 0x0000000110222080
DATA #4 : String, 360 bytes
Information of each subdirectory leading up to the first inaccessible
one is shown in the format below :
<UID>:<GID>:<permissions> (subdirectories)

0:0:755 (db)
1451:503:755 (db2inst1)
1451:503:755 (db2data)
1451:503:755 (SAMPLE)
1451:503:775 (db2inst1)
1451:503:775 (NODE0000)
1451:503:751 (SQL00001)
1451:503:600 (SQLOGCTL.LFH.2)
CALLSTCK: (Static functions may not be resolved correctly, as they are
resolved to the nearest symbol)
[0] 0x0900000005F9C1C4 pdOSSeLoggingCallback + 0x34
[1] 0x090000000302FDC4 oss_log__FP9OSSLogFacUiN32UlN26iPPc + 0x1C4
[2] 0x09000000030302A0 ossLogSysRC + 0xA0
[3] 0x090000000304EECC ossErrorIOAnalysis__FCPC21OSSErrorAnalysisParam
+ 0xC8C
[4] 0x0900000003050F68 ossErrorAnalysis@AF12_1 + 0x48
[5] 0x09000000128A10FC sqloSystemErrorHandler + 0x3E4
[6] 0x09000000128A2BB0 sqloSystemErrorHandler@glue7DC + 0x1B0
[7] 0x090000001071B588 sqloopenp + 0xBFC
[8] 0x09000000115D9D0C
@67@sqlpgRetrieveLatestLFHRecord__FP16LFH_PARAM_STRUCTPC9SQLP_LFCB +
0xB4
[9] 0x09000000114F5FBC sqlpgOpenLFH__FPCcT1P8SQLP_LFHP9SQLP_LFCB +
0x1D4


Then the issue is a permission issue.

Resolving The Problem

In this example, the group ID 1441 did not have read privilege on SQLOGCTL.LFH.1 and SQLOGCTL.LFH.2 (1451:503:600). Correct that with a "chmod 640" on the files.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Logging","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.7;9.5","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21690936