DBAtlas · Database operations atlas

library cache lock: Wait: contention on a library cache object handle (parse/DDL serialization)

Oracle

What 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.

Open in DBAtlas →

More from this engine