Oracle shared memory exception ORA-04031
Oracle 10g or earlier? Probably you already restarted the database. Then you can check SQL Area:
    SELECT sql_text, parsing_schema_name, executions FROM v$sqlarea ORDER BY executions desc;
If there are tens of thousands SQLs with 1 execution - you are having shared pool fragmentation. To avoid future exceptions either rewrite SQLs (usually not using binding variables causes SQL area bloat) or upgrade to 11g. It better handles shared pool fragmentation.