ORA-04021: timeout occurred while waiting to lock object

有个11.2.0.4 rac环境,时不时报错ORA-04021,时间点都是晚上22点多。

Sat Jun 03 22:48:55 2023
DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_j000_137809.trc:
ORA-04021: timeout occurred while waiting to lock object


Wed Jun 07 22:50:55 2023
DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_j001_124414.trc:
ORA-04021: timeout occurred while waiting to lock object

mos文档

Bug 6011045 - DBMS_STATS causes deadlock between 'cursor: pin S wait on X' and 'library cache lock' [ID 6011045.8]
Introduction to "Bug Description" Articles (Doc ID 245840.1)
Bug 9278979 - Instance hang / ORA-4021 with OPTIMIZER_USE_PENDING_STATISTICS = true (Doc ID 9278979.8)

该环境没有打过补丁,可能有bug,暂时无法重启了,只能先停止sql tuning advisor和auto space advisor继续观察,有最新的情况持续更新

SYS > exec dbms_auto_task_admin.disable(client_name => 'auto space advisor',operation => NULL,window_name => NULL);
SYS > xec dbms_auto_task_admin.disable(client_name => 'sql tuning advisor',operation => NULL,window_name => NULL);
SYS >  select client_name,status from dba_autotask_client;
 

你可能感兴趣的:(OracleDB,oracle,数据库,运维)