DBUA Error ORA-04031 unable to allocate 4120 bytes of shared memory, ORA-01034: ORACLE not available, ORA-00600: internal error code, arguments: [504] (Doc ID 789779.1)

Last updated on APRIL 06, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.7 to 12.1.0.2 [Release 9.2 to 12.1]
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 10.2.0.3
***Checked for relevance on 28-Mar-2013***


Symptoms

Using DBUA to upgrade DB database to higher version, this could occur with any other 10.2/11.2/12.1 release as well,  the following errors are logged in the DBUA log:-

create or replace package body dbms_stats_internal wrapped
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 3
ORA-04031: unable to allocate 88 bytes of shared memory ("shared pool","select
name,intcol#,segcol#,...","sql area","opn: qkexrInitOpn")

Warning: Package Body created with compilation errors.

Errors for PACKAGE BODY DBMS_STATS:

0/0 ORA-04031: unable to allocate 4128 bytes of shared memory
("shared pool","unknown object","PL/SQL MPCODE","BAMIMA: Bam
Buffer")

or

grant select on ku$_phtable_view to public
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","select
name,intcol#,segcol#,...","sql area","idndef*[]: qkexrPackName")

ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","select ....
.

or

select count(*), status from obj$ where type#=5 group by status
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 4120 bytes of shared memory ("shared pool","select /*+ rule */ bucket_cn...","Typecheck","kgghteInit")

[Thread-23] [12:23:36:76] [SQLEngine.initialize:322] Waiting for m_bReaderStarted to be true
[Thread-35] [12:26:33:29] [BasicStep.handleNonIgnorableError:430] oracle.sysman.assistants.util.UIMessageHandler@27db0da1:messageHandler
[Thread-35] [12:26:33:30] [BasicStep.handleNonIgnorableError:431] ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 4120 bytes of shared memory ("shared pool","select /*+ rule */ bucket_cn...","Typecheck","kgghteInit")
:msg
[Thread-23] [13:27:7:397] [SQLEngine.done:1951] Done called

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