IBM Support

Which DB2 directories to exclude from Linux Anti-virus software

Question & Answer


Question

While the Anti-virus software is actively scanning, DB2 can report SQLO_ACCD "Access Denied" errors. The Anti-virus software locks the file during scanning, and prevents DB2 from accessing it. Which DB2 directories need to be excluded from Anti-virus scanning to prevent the errors from occurring?

This is an example of the db2diag.log errors that are being logged:
2017-06-09-03.38.06.412868-240 E790514E1231 LEVEL: Error (OS)
PID : 30113 TID : 140072015881984 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-8769 APPID: *LOCAL.db2inst1.170611194451
AUTHID : DB2INST1 HOSTNAME: xxx.xxx.xxx EDUID : 684
EDUNAME: db2agent (SAMPLE) 0 FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80 MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied" DIA8701C Access denied for resource "",
operating system return code was "". CALLED : OS, -, open OSERR: EACCES (13) DATA #1 :
Codepath, 8 bytes 4:11:18:19:20:40 DATA #2 : File name,
62 bytes /user/db2inst1/db2inst1/NODE0000/SAMPLE/T0000002/C0000000.LRG DATA #3 :
SQO Open File Options, PD_TYPE_SQO_FILE_OPEN_OPTIONS, 4 bytes SQLO_REVISE, SQLO_READWRITE,
SQLO_SHAREWRITE, SQLO_FORCE_NON_BUFFERED DATA #4 :
Hex integer, 4 bytes 0x00000180 DATA #5 : signed integer, 4 bytes 0 DATA #6 :
Hex integer, 4 bytes 0x00004000 DATA #7 : String, 105 bytes Search for ossError*Analysis probe point after this log entry for further self-diagnosis of this problem. 2017-06-09-03.38.06.413617-240 I791746E5707 LEVEL: Error (OS) PID : 30113 TID : 140072015881984 PROC : db2sysc 0 INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-8769 APPID: *LOCAL.db2inst1.170611194451 AUTHID : DB2INST1 HOSTNAME: xxx.xxx.xxx
EDUID : 684 EDUNAME: db2agent (SAMPLE) 0 FUNCTION: DB2 Common, OSSe,
ossErrorIOAnalysis, probe:100 CALLED : OS, -, open OSERR: EACCES (13) DATA #1 : String,
160 bytes A total of 2 analysis will be performed : - User info - Path access permission Target file = /user/db2inst1/db2inst1/NODE0000/SAMPLE/T0000002/C0000000.LRG DATA #2 :
String, 188 bytes Real user ID of current process = 1022 Effective user ID of current process = 1022 Real group ID of current process = 1022 Effective group ID of current process = 1022 DATA #3 : String, 41 bytes current sbrk(0) value: 0x00000000012c0000 DATA #4 : String, 364 bytes Information of each subdirectory leading up to the first inaccessible one is shown in the format below : :: (subdirectories) 0:0:755 (user) 1022:0:755 (db2inst1) 1022:1022:755 (db2inst1) 1022:1022:755 (NODE0000) 1022:1022:755 (SAMPLE) 1022:1022:755 (T0000002) 1022:1022:755 (C0000000.LRG) CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol) [0] 0x00007F65CC57BE1B /home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x221E1B [1] 0x00007F65CC57D3A3 ossLogSysRC + 0xB3 [2] 0x00007F65CC56F244 /home/db2inst1/sqllib/lib64/libdb2osse.so.1 + 0x215244 [3] 0x00007F65CC56C50D ossErrorAnalysis + 0x2D [4] 0x00007F65D2B297CB sqloSystemErrorHandler + 0x71B [5] 0x00007F65D0B3CE9A sqloopenp + 0xA3A [6] 0x00007F65CDD84B4F _Z22sqlbResizeDMSContainerP12SQLB_POOL_CBijjP12SQLB_GLOBALS + 0x11F [7] 0x00007F65CDC6ACCF _Z22sqlbARExtendContainerslP12SQLB_POOL_CBP16SQLB_POOLCONT_CBbPlS3_P16SQLB_POOL_MAP_CBP12SQLB_GLOBALS + 0x12F [8] 0x00007F65CDC6AAB6 _Z18sqlbGrowContainerslP12SQLB_POOL_CBP16SQLB_POOL_MAP_CBP12SQLB_GLOBALS + 0x876 [9] 0x00007F65CDC68970 _Z17sqlbGrowLastRangeP12SQLB_POOL_CBP12SQLB_GLOBALS + 0x120 [10] 0x00007F65CDC67BF6 _Z12sqlbGrowPoolP12SQLB_POOL_CBP12SQLB_GLOBALS + 0x466 [11] 0x00007F65CDD887B0 _Z18sqlbSearchSomeSMPsjjbPjPbS_P12SQLB_POOL_CBP16SQLB_OBJECT_DESCS0_tP11SQLB_FIX_CBP12SQLB_GLOBALS + 0x320 [12] 0x00007F65CDC5CF02 _Z18sqlbAllocateExtentP12SQLB_GLOBALSP12SQLB_POOL_CBP16SQLB_OBJECT_DESCPjt + 0x14F2 [13] 0x00007F65CDD7CCFA _Z25sqlbObtainAnchorEMPExtentP12SQLB_GLOBALSP16SQLB_OBJECT_DESCPj + 0xCA [14] 0x00007F65CDD760F0 sqlbDMSCreateObject + 0xF0 [15] 0x00007F65CDDA7269 _Z16sqlbCreateObjectP16SQLB_OBJECT_DESCjjP12SQLB_GLOBALS + 0x419 [16] 0x00007F65CDE4A50D /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x137C50D [17] 0x00007F65CDE49C2F /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x137BC2F [18] 0x00007F65CDE43C3B _Z20sqldBeginIndexCreateP8sqeAgentP17SQLD_CREATEINX_CB + 0x47B [19] 0x00007F65D0FC2308 _Z20sqlrlCreateIndexPartP8sqlrr_cbP8sqlrg_idP17SQLD_CREATEINX_CBi + 0x58 [20] 0x00007F65D1023EED /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x4555EED [21] 0x00007F65D32C2139 _Z22sqlrlAlterPartitionOpsP8sqlrr_cbPhtS1_thS1_tS1_tP17sqlrl_table_parmsPP8sqlrg_pdttP18sqlrg_datapartinfo + 0xA49 [22] 0x00007F65D1020C63 _Z8sqlrlaltP8sqlrr_cbPhsS1_sS1_sS1_sP8sqlrg_pdP17sqlrl_table_parmsilP18sqlrg_datapartinfoPbbP9sqlnq_ftbb + 0xB453 [23] 0x00007F65D0585DF1 _Z21sqlnq_alter_table_endP9sqlnq_qtb + 0x1B51 [24] 0x00007F65D0584171 _Z22sqlnq_alter_table_stmtPP8stknode_i10actiontypePhP3loc + 0x71 [25] 0x00007F65D3AB4544 _Z12sqlnp_smactnP8sqlnp_cbi + 0xA84 [26] 0x00007F65D0481B3A _Z12sqlnp_parserP8sqlnp_cb + 0x78A [27] 0x00007F65D0489611 _Z10sqlnp_mainP12sqlnq_stringbP3locPP9sqlnq_qur + 0x2A1 [28] 0x00007F65D0180615 /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x36B2615 [29] 0x00007F65D017FAE2 _Z10sqlnn_cmplP8sqeAgentP11sqlrrstrings17sqlnn_compileModesP14sqlrr_cmpl_env + 0x22 [30] 0x00007F65D0DF3ABE _Z17sqlra_compile_varP8sqlrr_cbP14sqlra_cmpl_envPhitiiiiiP14SQLP_LOCK_INFOP16sqlra_cached_varPiS5_Pb + 0x80E [31] 0x00007F65D0E044D3 _Z14sqlra_find_varP8sqlrr_cbP17sqlra_cached_stmt13sqlra_stmt_idjjPhjthP14sqlra_cmpl_env15sqlra_fill_modePiiS8_iiiS8_P14SQLP_LOC + 0x6B3 [32] 0x00007F65D0E5A264 _Z13sqlra_get_varP8sqlrr_cbiibPbS1_ + 0x834 [33] 0x00007F65D0EDEF95 _Z21sqlri_ddl_get_sectionP8sqlrr_cb + 0x65 [34] 0x00007F65D0EDE41B _Z16sqlri_ddl_commonP8sqlrr_cb + 0x39B [35] 0x00007F65D0EDDFB7 _Z8sqlriddlP8sqlrr_cb + 0x27 [36] 0x00007F65D3B54C87 _Z15sqlriSectInvokeP8sqlrr_cbP12sqlri_opparm + 0x1B7 [37] 0x00007F65D0D3DAF2 _Z23sqlrr_execute_immediateP8sqlrr_cbi + 0x552 [38] 0x00007F65D0D30156 _Z14sqlrr_execimmdP14db2UCinterfaceP16db2UCprepareInfo + 0x126 [39] 0x00007F65CFEC51D2 _Z19sqljs_ddm_excsqlimmP14db2UCinterfaceP13sqljDDMObject + 0x552 [40] 0x00007F65D3A71F76 _Z21sqljsParseRdbAccessedP13sqljsDrdaAsCbP13sqljDDMObjectP14db2UCinterface + 0x3F6 [41] 0x00007F65CFEA0B6B _Z10sqljsParseP13sqljsDrdaAsCbP14db2UCinterfaceP8sqeAgentb + 0x36B [42] 0x00007F65CFE9B0A0 /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x33CD0A0 [43] 0x00007F65CFE995CC /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x33CB5CC [44] 0x00007F65CFE96619 /home/db2inst1/sqllib/lib64/libdb2e.so.1 + 0x33C8619 [45] 0x00007F65CFE9620B _Z17sqljsDrdaAsDriverP18SQLCC_INITSTRUCT_T + 0xEB [46] 0x00007F65CFB9A6A8 _ZN8sqeAgent6RunEDUEv + 0xCB8 [47] 0x00007F65D1385A27 _ZN9sqzEDUObj9EDUDriverEv + 0xF7 [48] 0x00007F65D0B513A3 sqloEDUEntry + 0x303 [49] 0x0000003F94A07AA1 /lib64/libpthread.so.0 + 0x7AA1

Cause

Linux Anti-virus software locks fhe file while scanning, preventing DB2 from accessing it.

Answer

Need to exclude the directories used by the database - specifically the storage groups. To indentify the storage groups, review the output from

db2pd -storagepaths -alldbs

For example:

  • Database Member 0 -- Database SAMPLE -- Active -- Up 0 days 00:13:31 -- Date 2017-06-20-05.57.24.256059

    Storage Group Configuration:
    Address SGID Default DataTag Name
    0x00007FFF9773D820 0 Yes 0 IBMSTOGROUP

    Storage Group Statistics:
    Address SGID State Numpaths NumDropPen
    0x00007FFF9773D820 0 0x00000000 1 0

    Storage Group Paths:
    Address SGID PathID PathState PathName
    0x00007FFF97761000 0 0 InUse /user/db2inst1

    Database Member 0 -- Database TESTDB -- Active -- Up 0 days 00:13:19 -- Date 2017-06-20-05.57.24.292212

    Storage Group Configuration:
    Address SGID Default DataTag Name
    0x00007FFF5B317820 0 Yes 0 IBMSTOGROUP

    Storage Group Statistics:
    Address SGID State Numpaths NumDropPen
    0x00007FFF5B317820 0 0x00000000 1 0

    Storage Group Paths:
    Address SGID PathID PathState PathName
    0x00007FFF5B33B000 0 0 InUse /user/db2inst1

You need to exclude
/user/db2inst1/db2inst1/NODE0000
from being scanned by the Anti-virus software.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"}],"Version":"10.5;11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
07 December 2022

UID

swg22004989