Shared memory heapdump trace
                                                 Last update (2011-05-13 13:42:20)
                                                                                                                   Date added (2011-05-06 11:20:12)

Summary
A very common error related to shared pool misconfiguration or problems is:
ORA-04031: unable to allocate x bytes of shared memory.

At the time the errors of the shared pool happen you can run a trace at the heapdump with the following command:
SQL>alter system set events = 'immediate trace name heapdump level 536870914';
This will take some time, since it analyzes all the shared memory. When it will finish a big trace file will be generated under udump directory.

If you are not online at the time the errors appearing then you can set it to the init parameters with the command:
event="4031 trace name heapdump level 536870914"
or 
alter system set event="4031 trace name heapdump level 536870914" scope=spfile;
This will also create the trace files at udump directory if shared memory problems appear again in the future.

Other links
Shared pool free space
Shared pool loaded objects
Large pool size and contents
Reviews
Filters
Search