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

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"
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
Oracle DBA-> (147)
  Alertlog (3)
  Archivelog (5)
  Auditing (1)
  Backup - Recovery (19)
  Database files (6)
  Database options (2)
  DB links (2)
  Dependencies (1)
  Dictionary (2)
  Exp-Imp Datapump (6)
  Jobs (2)
  Mview (2)
  Networking (3)
  Objects (7)
  Parameters (2)
  Redologs (6)
  Roles - Grants (2)
  Rollback - Undo (8)
  Segments (3)
  Sequences (2)
  Sessions (14)
  SGA (14)
  Tables (10)
  Tablespaces (10)
  Temp (4)
  Toad (5)
  Transactions (1)
  Upgrade (2)
  Users (3)
Oracle APPS DBA-> (66)
Exadata (1)
Performance Tuning-> (59)
Oracle Real Cases (24)
Oracle Errors (23)
Oracle SQL tricks (32)
Oracle RAC (3)
Oracle Security (8)