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?

  • 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, 2013 at 7:12
  • Try shutting down ALL databases, then try to start up the trouble database. Does it start ?
    – tvCa
    Jan 25, 2015 at 13:01
  • but if you're getting "idle instance", means you DON'T have the instance started. Apr 13, 2017 at 17:21

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.


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.