Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Showing results for 
Search instead for 
Did you mean: 

ORA-04031 Error

Occasional Contributor

ORA-04031 Error


We are getting the ORA-04031 error while running our application on Database.

The exact error we get is:
Unable to allocate 4216 bytes of shared memory ("shared pool","unknown object","sga heap(2,0)","library cache")

As we found from the various sources, this is due to fragmented SGA, or insufficient Shared Memory.

Our init.ora Parameter for Shared Pool are:


We are executing the SELECT query which return 8,00,000 rows. We are also having one other query which executed 8,00,000 times.

Is this SELECT Statement can cause this error?

As we are getting the Notification related to Library cache, is it related to fragmented Library Cache?

Please help us in resolving this issue.

Thanks in Advance.