ITPub博客

首页 > 数据库 > Oracle > ORA-2710,ORA-04031

ORA-2710,ORA-04031

原创 Oracle 作者:fiona8953 时间:2015-02-17 10:49:02 0 删除 编辑

ORA-27101: shared memory realm does not existtips

27101, 00000, "shared memory realm does not exist"
// *Cause: Unable to locate shared memory realm
// *Action: Verify that the realm is accessible

For checking on trailing trash:

$ echo $ORACLE_HOME
$ /app/oracle/817/ << Incorrect

$ echo $ORACLE_HOME
$ /app/oracle/817 << Correct

For ORACLE_SID:

$ echo $ORACLE_SID
$ ora817

$ ps -ef | grep smon 
ora_smon_ORA817

(Here, ORACLE_SID setting has been altered from ora817 to ORA817.)

Basically, to resolve ORA-27101, Once ORACLE_HOME and ORACLE_SID are correct, and then attempt to start SQL*Plus. 



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

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.

Answer:  The ORA-04031 error has many root causes.  Also, see MOSC notes 146599.1 and 396940.1 for more details for resolving the ORA-04031 error:
  •  Heavy fragmentation of the shared pool - This can be fixed by increasing theshared_pool_size or doing a "alter system flush shared pool" or bouncing the instance.
  • Too many pinned packages - If you have pinned lots of packages withdbms_shared_pool.keep, they have not leave enough room for new work.

Ultimately the solution to a ORA-04031 error is adding RAM to shared_pool_size and/orshared_pool_reserved_size.

The Oracle documentation has these notes on the ORA-04031 error:

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

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 INIT.ORA parameters "shared_pool_reserved_size" and "shared_pool_size". If the large pool is out of memory, increase the INIT.ORA parameter "large_pool_size".

The ORA-04031 error also happens when you are using automatic memory management (sga_max_size), and the memory specific is too small.


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26477398/viewspace-1437707/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: PostgreSQL新手入门
请登录后发表评论 登录
全部评论

注册时间:2014-06-13

  • 博文量
    284
  • 访问量
    222491