您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Oracle 参数shared_pool_size

2024/3/28 11:41:52发布12次查看
shared_pool随着申请,一直尽量地长,长到占sga的50%的时候,就不再长,然后由于碎片而报ora-04031错误
环境:
idle> select * from v$version;
banner 
---------------------------------------------------------------- 
oracle database 10g enterprise edition release 10.2.0.1.0 - prod 
pl/sql release 10.2.0.1.0 - production 
core    10.2.0.1.0      production 
tns for linux: version 10.2.0.1.0 - production 
nlsrtl version 10.2.0.1.0 - production 
assm下
该参数的大小是shared pool的最小值,分配的值不能低于该值
如果超过这个值,memory advisor会在sga_target的范围内自动调整
idle> select component, current_size,min_size,max_size,user_specified_size from v$sga_dynamic_components where component='shared pool';
component                current_size  min_size  max_size user_specified_size
------------------------- ------------ ---------- ---------- -------------------
shared pool                  192937984  192937984          0            96468992
idle> show parameter shared_pool_size
name                                type        value
------------------------------------ ----------- ------------------------------
shared_pool_size                    big integer 92m
idle> select 92*1024*1024 from dual;
92*1024*1024
------------
    96468992
但是,有些人建议,只要不是用来玩的库,都建议使用手动管理
shared_pool随着申请,一直尽量地长,,长到占sga的50%的时候,就不再长,然后由于碎片而报ora-04031错误
放养易失控,圈养不健康,oracle提供的自动功能永远不会是最优化选择
如果sga采用assm,对于事务繁忙的系统,shared_pool会不断长,到时候报ora-04031
案例1:
曾经一个运营商的库,sga_target 15g,不断报ora-04031,此时共享池到7.5g+了。
改成手动管理后,1g shared_pool,几年没报过错
案例2:
我手里有一个系统 10g on linux ,shared_pool 从 800m 调到 1g,拼命报4031
为了不放弃自动调整sga这个特性
我把db_cache_size调大,硬是把 shared_pool可增长的空间给吃掉就好
确实,设置db_cache_size即可解决shared_pool占用过多的问题
或者,您也可以:
设置这两个参数也行
shared_pool_reserved_size
_shared_pool_reserved_min_alloc:最小改到4100,不能任意小
idle> select  a.ksppinm name,b.ksppstvl value,a.ksppdesc description
        from  x$ksppi a,x$ksppcv b
      where  a.indx = b.indx  and
              a.ksppinm like '%_shared_pool_reserved_min_alloc%';
name                            value      description
-------------------------------- ---------- --------------------------------------------------
_shared_pool_reserved_min_alloc  4400      minimum allocation size in bytes for reserved area
                                            of shared pool
附上ocp相关考题:
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product