Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Why am I receiving the error message: ORA-04031: unable to allocate bytes of shared memory?

Why am I receiving the error message: ORA-04031: unable to allocate bytes of shared memory?

Problem:

Why am I receiving the error message: ORA-04031: unable to allocate bytes of shared memory?

Resolution:

An example of the error message "ORA-04031: unable to allocate bytes of shared memory" is shown in the screenshot below:

ORA-04031 error message

This error message is caused because more shared memory is needed than was allocated in the shared pool. In the screenshot above it is the "large pool" that needs more memory than it has been allocated.

One way to resolve this error would be to allocate more memory to the relevant pool from the shared pool. However if the shared pool is out of memory, you can either use the "dbms_shared_pool" package to pin large packages, reduce your use of shared memory, or increase the amount of available shared memory by increasing the value of the INIT.ORA parameters "shared_pool_reserved_size" and "shared_pool_size". If the large pool is out of memory as in the screenshot above, you could increase the INIT.ORA parameter "large_pool_size".

A better way to resolve this however would be to use the functionality that exists within Oracle 10g. This is called Automatic Shared Memory Management (ASMM) which automatically sizes many of the memory pools while the database is running, allocating and de-allocating memory as needed.

The following link describes the ASMM functionality and how to go about implementing it: Oracle 10g ASMM

Old KB# 25148

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:53
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.