Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

91

积分

0

好友

3

主题
1#
发表于 2012-3-7 22:31:15 | 查看: 6676| 回复: 6
数据库报错:  ORA-00603: ORACLE server session terminated by fatal error  ORA-00604: error occurred at recursive SQL level 1  ORA-04031: unable to allocate 3896 bytes of shared memory ("shared pool","select name,online$,contents...","sga heap(1,0)","kglsim o  bject batch")

想请问一下,
在执行完alter system flush shared_pool之后,为什么执行相关语句还是报同样的错?

谢谢 !
2#
发表于 2012-3-7 22:44:06
action plan:

上传4031 相关的trace , trace路径可以在alert.log 中找到

oradebug setmypid;
oradebug unlimit;
oradebug dump heapdump 536870914;
oradebug tracefile_name;

上传以上生成的trace

回复 只看该作者 道具 举报

3#
发表于 2012-3-7 23:10:57
这个heapdump 没有做,现在想问一下这种执行完alter system flush shared_pool之后,执行相关语句还是报同样的错 可以
会是什么原因?

回复 只看该作者 道具 举报

4#
发表于 2012-3-7 23:28:02
flush shared_pool不能释放 perm chunk和 pin chunk , 如果共享池碎片过多 那么刷新并不能解决ORA-4031 ,

建议你现在做一个 oradebug dump heapdump 536870914; 然后上传trace

回复 只看该作者 道具 举报

5#
发表于 2012-3-7 23:34:19


想问一下 :flush shared_pool不能释放 perm chunk和 pin chunk 这个有文档介绍吗?

回复 只看该作者 道具 举报

6#
发表于 2012-3-8 00:17:58
ODM Finding:

Chunk types:

Normal (freeable) chunks - These chunks are allocated in such a way that the user can explicitly free
the chunk once they have finished with the memory.

Free chunks - These chunks are free and available for reuse should a request come into the pool for
this chunk size or smaller.

Recreatable chunks - This is a special form of "freeable" memory.  These chunks are placed on an
LRU list when they are unpinned.   If memory is needed, we go to the LRU list and free "recreatable"
memory that hasn't been used for a while.

Permanent chunks - These chunks can be allocated in different ways.   Some chunks are allocated
and will remain in use for the "life" of the instance.   Some "permanent" chunks are allocated but can
be used over and over again internally as they are available.

回复 只看该作者 道具 举报

7#
发表于 2012-3-8 00:22:01
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump heapdump 536870914;
Statement processed.
SQL> oradebug tracefile_name;
/s01/orabase/diag/rdbms/vprod/VPROD1/trace/VPROD1_ora_7796.trc
SQL> select * from V$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production


在 heapdump 中会有以下信息:

Total reserved free space   =  2557736

UNPINNED RECREATABLE CHUNKS (lru first):
SEPARATOR
Unpinned space     =        0  rcr=0 trn=0

PERMANENT CHUNKS:
  Chunk        09e800058 sz=       80    perm      "perm           "  alo=80
Permanent space    =       80

Freeable 和 UNPINNED RECREATABLE CHUNKS 可以被flush out

If objects are used only intermittently, they may be flushed out of the shared pool. Some recreatable objects are very expensive to recreate. Sometimes it is undesirable to flush freeable objects like sequences. It is possible to mark valuable objects to prevent them from being flushed out.

Freeable: The chunk of space can be freed by calling kghfre(). Recreatable: The chunk of space is recreatable. This implies that it is also freeable. A recreatable chunk of space may be explicitly unpinned by the client layer.

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-15 07:33 , Processed in 0.049417 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569