首页 > Linux操作系统 > Linux操作系统 > 一篇share pool结构佳文
NAME VALUE DESCRIPTION5、如何获得各个sub pool中空间信息,ksmdsidx中,0表示内部使用内存,1表示sub pool #1
-------------- ----------- ------------------------
_kghdsidx_count 2 max kghdsidx count
3、每个sub pool由一个share pool latch控制,3~7表示未使用。
SQL>select child#, gets
from v$latch_children
where name = 'shared pool'
order by child#;
CHILD# GETS
---------- ----------
1 29906417
2 24955057
3 2905
4 2905
5 2905
6 2905
7 2905
4、ORA-04031错误
ORA-04031: "unable to allocate n bytes of shared memory
("shared pool", "object_name", "alloc type(2,0)" ...)
type(2,0)表示sub pool# =2, sub sub pool=0
该错误通常造成原因:
a)、shared pool空间太小
b)、空闲空间碎片太多
c)、在不同的sub pool中内存使用/空闲空间使用不平衡
SQL>select ksmdsidx sub_pool, sum(ksmsslen) bytes
from x$ksmss
where ksmsslen>0
group by ksmdsidx
order by sub_pool;
SUB_POOL BYTES
---------- ----------
0 16777216
1 236552072
2 238228464
也可以通过该视图查看subpool下具体各个部分分配情况。
另外参看metalink396940.1: Troubleshooting and Diagnosing ORA-4031 Error
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/354732/viewspace-606428/ ,如需转载,请注明出处,否则将追究法律责任。