ORA-04021: While Revoking EXECUTE ON Privilege on DBMS_AQ Package
(Doc ID 2267643.1)
Last updated on AUGUST 04, 2018
Applies to:Oracle Database - Enterprise Edition - Version 126.96.36.199 and later
Information in this document applies to any platform.
Getting the ORA-04021 Error while trying to revoke the DBMS_AQ privilege:
SQL> Revoke EXECUTE ON DBMS_AQ from APPLSYS;
Revoke EXECUTE ON DBMS_AQ from APPLSYS
ERROR at line 1:
ORA-04021: timeout occurred while waiting to lock object.
This is locking error where Oracle uses a piece of memory which is shareable among all the database users calling the Library Cache. This maintains information about objects such as pl/sql packages, views, tables, etc.The object cannot be changed while in use. In order to modify the object, there is a lock in the library cache. A session will wait on the library cache as the object is in use. Until the lock is released, the error ora-4021 error.
Make sure that any AQ operations for the other schema users are stopped before attempting to revoke the execute privilege
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document