ORA-04021: TIMEOUT OCCURRED WHILE WAITING TO LOCK OBJECT

The library cache, which is part of the shared pool in the Oracle instance, contains the definition of different objects, cursors, indexes, tables, functions, packages. When these objects are in use, they cannot be changed.


If someone is updating a table, you cannot change the definition of the table. If someone is using a procedure, you cannot compile the procedure. If someone is using an index, you cannot drop the index.