"ORA-04031: Unable to Allocate xxxx Bytes Shared Memory" Even After SHARED_POOL Is Increased During Upgrade to 10gR2 (Doc ID 444074.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.5 [Release 10.2]
Information in this document applies to any platform.
***Checked for relevance on 04-Jun-2013***

Symptoms

When attempting to run catupgrd.sql as post-installation of any 10.2.0.x patchset, the following error occurs:

ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","delete from obj$ where obj# ...","sga heap(1,0)","kglsim object batch")


The catupgrd.sql log file shows entries like below:

begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
*
ERROR at line 1:
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","delete from obj$ where obj# ...","sga heap(1,0)","kglsim object batch")
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","delete from settings$ where ...","sga heap(1,0)","kglsim object batch")
ORA-06512: at "SYS.INITJVMAUX", line 23
ORA-06512: at line 5

select count(*) from all_objects where object_type like 'JAVA%'
                     *
ERROR at line 1:
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","select count(*) from all_obj...","sga heap(1,0)","kglsim object batch")

...
ERROR:
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","SELECT :jvmrmaction jvmrmact...","sga heap(1,0)","kglsim object batch")


begin if :jvmrmaction = 'FULL_REMOVAL' or
*
ERROR at line 1:
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","select count(*) from associa...","sga heap(1,0)","kglsim object batch")
ORA-06512: at "SYS.INITJVMAUX", line 32
ORA-06512: at line 5

....

create or replace package body dbms_java as
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","delete from procedureinfo$ w...","sga heap(1,0)","kglsim object batch")    

create or replace FUNCTION dbj_short_name (longname VARCHAR2)
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","delete from procedureinfo$ w...","sga heap(1,0)","kglsim object batch")
...
select dbms_java.longname('foo') from dual
                                      *
ERROR at line 1:
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","select dbms_java.longname('f...","sga heap(1,0)","kglsim object batch")

delete from java$rmjvm$aux3
*
ERROR at line 1:
ORA-04031: unable to allocate 3896 bytes of shared memory ("shared
pool","delete from java$rmjvm$aux3","sga heap(1,0)","kglsim object batch")

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms