«

»

May 28

Print this Post

ORA-04031: unable to allocate 32 bytes of shared memory

This error has occurred during the compiling invalid objects using utrl.sql in oracle. The cause of ORA-04031 error is due to ‘Run out of memory while compiling objects’ OR ‘Not enough sufficient memory in the shared pool’

Error:

ERROR at line 1:

ORA-04031: unable to allocate 32 bytes of shared memory (“shared pool”,”select

cols,audit$,textlengt…”,”SQLA”,”tmp”)

ORA-06512: at “SYS.UTL_RECOMP”, line 581

ORA-06512: at “SYS.UTL_RECOMP”, line 584

ORA-06512: at “SYS.UTL_RECOMP”, line 780

ORA-04031: unable to allocate 32 bytes of shared memory (“shared pool”,”select

/*+ rule */ bucket, e…”,”SQLA”,”tmp”)

ORA-06512: at line 4

Solution:

Check the following Parameters:

SQL> SHOW PARAMETER SHARED_POOL_SIZE
SQL> SHOW PARAMETERSGA_TARGET

Apply the following Solution:

1. Increase the SHARED_POOL_SIZE

2. Adjust Automatic Shared Memory Management (SGA_TARGET) as per all SGA components

3. Re run @utlrp.sql to validate the invalid objects in the database and test it

$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus "/ as sysdba"
SQL> @utlrp.sql

Note: SGA_TARGET specifies the total size of all SGA components. If SGA_TARGET is specified, then the following memory pools are automatically sized:

  •   Buffer cache (DB_CACHE_SIZE)
  •   Shared pool (SHARED_POOL_SIZE)
  •   Large pool (LARGE_POOL_SIZE)
  •   Java pool (JAVA_POOL_SIZE)

 

Permanent link to this article: http://myappsdba.com/ora-04031-unable-to-allocate-32-bytes-of-shared-memory/

Leave a Reply

Your email address will not be published. Required fields are marked *