My Oracle Support Banner

datapatch fails with Error: "ORA-04021: timeout occurred while waiting to lock object" (Doc ID 2213685.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Oracle Database - Standard Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
Information in this document applies to any platform.

Symptoms

From the post patch apply log.
-----------------------------

1) In RAC Environment:

SQL> GRANT SELECT ON sys.v_$instance TO dv_secanalyst
2 /

Grant succeeded.

SQL>
SQL> GRANT SELECT ON sys.gv_$instance TO dv_secanalyst
2 /
GRANT SELECT ON sys.gv_$instance TO dv_secanalyst
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object
SQL>
SQL> GRANT SELECT ON sys.v_$session TO dv_secanalyst
2 /

Grant succeeded.

 

 

2) Due to AQ jobs:

create or replace package prvt_ilm wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object


SQL> show errors
No errors.
SQL> /
create or replace package prvt_ilm wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object
|
|
SQL> SELECT dbms_sqlpatch.install_file('rdbms/admin/prvtaqds.plb') AS
install_file
  2    FROM dual;

INSTALL_FILE
------------------------------------------------------------------------------
--
?/rdbms/admin/prvtaqds.plb
|
1347  
1348  /
CREATE OR REPLACE PACKAGE BODY dbms_aqadm_sys wrapped
*
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.