Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

My setup:

  • Oracle 11g
  • 32G RAM
  • 8 CUP threads

Three oracle instances have been running. But running this:

sqlplus "/as sysdba"

gives me a prompt:

Connected to an idle instance.

When I issue the startup command, I get this error:

ORA-04031 unable to allocate 2048 bytes shared memory ("shared pool","unknow object","sga heap(1,0)","procs:ksunfy");

But three Oracle instances are working now.

Maybe I changed some config incorrectly. What can I do to fix this?

share|improve this question

migrated from Oct 12 '13 at 8:50

This question came from our site for professional and enthusiast programmers.

How much memory is already allocated to the other three instances? How much is free? And what are the memory settings for the instance you're trying to start? – Alex Poole Oct 12 '13 at 7:12
Try shutting down ALL databases, then try to start up the trouble database. Does it start ? – tvCa Jan 25 at 13:01

3 Answers 3

Launch this command on OS prompt and will obtain:

[oracle@datab ~]$ oerr ORA 04031
04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")"
// *Cause:  More shared memory is needed than was allocated in the shared
//          pool.
// *Action: If the shared pool is out of memory, 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
//          initialization parameters SHARED_POOL_RESERVED_SIZE and
//          SHARED_POOL_SIZE.
//          If the large pool is out of memory, increase the initialization
//          parameter LARGE_POOL_SIZE.

You can try to increase values as help says, or go and take a look here, for example.

share|improve this answer

This message means ORACLE is requesting Shared memory from the operating system, but is receiving less than expected or none at all.

Are you sure no other (non-ORACLE) applications on the operating system are using shared memory?

As a last resort, rebooting the server will clear the shared memory allocated. If the error happens after rebooting the server, there is either not enough shared memory or a problem with the way ORACLE was installed. Make sure the all the kernel parameters were set based on the ORACLE installation document to the recommended values, including shmmax, shmmni, ETC.

share|improve this answer

There may have been enough memory to start the 3 instances at the time but now that you are trying to connect to one of the instances, the OS is trying to allocate some memory to your session process and cannot get as much as it is asking for. Check the sum total of the maximum memory currently configured for your 3 instances and look at what else is running on the server and may be consuming memory. This may be lots of local database sessions as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.