library cache lock: Wait: contention on a library cache object handle (parse/DDL serialization)
OracleWhat does it mean?
A session is waiting for a lock on an object in the library cache (SQL, PL/SQL, table definition). Usually caused by serialization of parse and DDL operations.
Why does it happen?
DDL (ALTER/CREATE) on heavily used objects, PL/SQL objects frequently recompiled (invalidation), excessive hard parsing, invalidation of dependent objects, or heavy concurrent connection storms.
How to fix it
Find the blocking session and object (v$session, ASH, library cache lock diagnostics if needed). Avoid running DDL on heavily used objects during peak hours. Reduce dependency chains and prevent unnecessary recompilations. Lower hard parsing by using bind variables. Smooth out connection storms with a connection pool.
More from this engine
- db file scattered readWait: multi-block physical read, typically a full table or index fast full scan
- buffer busy waitsWait: contention for a buffer already being read or modified by another session
- gc buffer busyWait (RAC): contention for a cache-fusion block being transferred between instances
- ORA-00604error occurred at recursive SQL level
- ORA-01438value larger than specified precision allowed for this column
- ORA-01400cannot insert NULL into (column)
- ORA-02291integrity constraint violated - parent key not found