Go Premium for a chance to win a PS4. Enter to Win


ORA-00604: error occurred at recursive SQL level 2

Posted on 2003-11-06
Medium Priority
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

Accepted Solution

baonguyen1 earned 80 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

885 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