ORA-00604: error occurred at recursive SQL level 2

Posted on 2003-11-06
Last Modified: 2007-12-19
When my oracle run about several days, it wll show the error message below:

ORA-00604: error occurred at recursive SQL level 2
ORA-04031: unable to allocate 4200 bytes of shared memory
("shared pool","TRIGGER$","sga heap","state objects")
ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 4200 bytes of shared memory
("shared pool","unknown object","sga heap","state objects")

What can I do about this?

Question by:meloling
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

baonguyen1 earned 20 total points
ID: 9699301
Which version you are running. Is it 8.1.7 ?

Try to:

1. Increase SHARED_POOL_SIZE parameter
2. Set _db_handles_cached to zero

You may need to apply the patchset, Oracle recommends 8174 as it seems you run into memory leaks problem

Hope this helps

Expert Comment

ID: 9700895
Your shared pool is fragmented.
Try to  flush SGA.
You may have to bounce database.
Increase SHARED_POOL_SIZE parameter if it is low.
LVL 13

Expert Comment

ID: 9710328
the errors can also be due to

ORA-4031 / SGA memory leak of PERMANENT memory occurs for buffer handles.
work around : use the undocumented parameter _db_handles_cached = 0 . This bug has been resolved in versions above

ORA-4031 due to leak / cache buffer chain contention from AND-EQUAL access  
This bug has been resolved in versions above

< Bug:1318267  >
   INSERT AS SELECT statements may not be shared when they should be if  TIMED_STATISTICS is set to true . It can lead to ORA-4031
Workaround : set _SQLEXEC_PROGRESSION_COST=0  
Resolved in

<  Bug:1193003 >
     Cursors may not be shared in 8.1 when they should be
Resolved after version

ORA-4031/excessive "miscellaneous"
shared pool usage possible. (many PINS) .This is known to affect the XML parser.  
resolved after

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question