The following command can be used to dump the library cache
ALTER SESSION SET EVENTS 'immediate trace name library_cache level level';
where level is one of the following
| Level | Description |
| 1 | Dump library cache statistics |
| 2 | Include hash table histogram |
| 3 | Include dump of object handles |
| 4 | Include dump of object structures (heap 0) |
For example:
ALTER SESSION SET EVENTS 'immediate trace name library_cache level 1';
The following ORADEBUG command has the same effect:
ORADEBUG DUMP LIBRARY_CACHE level