db_cache_size、shared_pool_size一些初始化参数为0?!

很奇怪,今天查询db_cache_size的时候发现value为0,后来查了下一些共享区,居然也是0。

SQL> show parameter db_cache_size
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
db_cache_size                        big integer                       0

SQL> show parameter shared_pool_size
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
shared_pool_size                     big integer                       0

SQL> show parameter pool
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
buffer_pool_keep                      string
buffer_pool_recycle                    string
global_context_pool_size           string
java_pool_size                        big integer                      0
large_pool_size                        big integer                    0
olap_page_pool_size                  big integer                0
shared_pool_reserved_size      big integer                 22649241
shared_pool_size                      big integer                  0
streams_pool_size                      big integer                 0

后来通过wh62592855的博客http://blog.csdn.net/wh62592855/article/details/4873859了解到是因为设置了sga_target的缘故。

REFERENCES上说明的db_cache_size这个参数,其中有一句话如下:

Default valueIf SGA_TARGET is set: If the parameter is not specified, then the default is0 (internally determined by the Oracle Database). If the parameter is specified, then the user-specified value indicates a minimum value for the memory pool.

If SGA_TARGET is not set, then the default is either 48 MB or 4 MB * number of CPUs, whichever is greater

因为使用了10G的ASSM自动共享内存管理,所以oracle会自动分配给各池空间,因此其值为0。


查看系统在某个时刻这些参数到底被自动地调整到了什么值

select x.ksppinm name,y.ksppstvl value,x.ksppdesc describ 
 from sys.x$ksppi x,sys.x$ksppcv y 
 where x.inst_id=userenv('Instance') and y.inst_id=userenv('Instance') and x.indx=y.indx and x.ksppinm like '%pool_size%';

NAME                                    VALUE                                                DESCRIB

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_NUMA_pool_size             Not specified                                     aggregate size in bytes of NUMA pool
__shared_pool_size         452984832                                        Actual size in bytes of shared pool
shared_pool_size              0                                                           size in bytes of shared pool
__large_pool_size            16777216                                          Actual size in bytes of large pool
large_pool_size                  0size in bytes of large pool
__java_pool_size              16777216                                          Actual size in bytes of java pool
java_pool_size                    0                                                         size in bytes of java pool
__streams_pool_size       0                                                          Actual size in bytes of streams pool
streams_pool_size            0                                                         size in bytes of the streams pool
_io_shared_pool_size       4194304                                          Size of I/O buffer pool from SGA
_backup_io_pool_size      1048576memory to reserve from the large pool
global_context_pool_size                                                            Global Application Context Pool Size in Bytes
olap_page_pool_size         0                                                        size of the olap page pool in bytes
select x.ksppinm name,y.ksppstvl value,x.ksppdesc describ
from sys.x$ksppi x,sys.x$ksppcv y
where x.inst_id=userenv('Instance') and y.inst_id=userenv('Instance') and x.indx=y.indx and x.ksppinm like '%db_cache_size%';

NAME                                    VALUEDESCRIB
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__db_cache_size              1644167168                Actual size of DEFAULT buffer pool for standard block size buffers
db_cache_size                    0Size of DEFAULT buffer pool for standard block size buffers

*由两个下划线开头的参数决定了当前SGA的分配,也是动态内存管理调整的参数。这些参数的更改会被记录到SPFILE文件中,在下一次数据库启动时仍然有效。


通过ORACLE 10G新增加的动态视图v$sga_dynamic_components,可以看各个动态组件调整的时间和调整类型等信息。

select component,current_size,min_size,last_oper_type,last_oper_mode,to_char(last_oper_time,'yyyy-mm-dd hh24:mi:ss') LOT
from v$sga_dynamic_components;

COMPONENT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CURRENT_SIZE   MIN_SIZE LAST_OPER_TYPE                          LAST_OPER_MODE              LOT
------------ ---------- --------------------------------------- --------------------------- ---------------------------------------------------------
shared pool
   452984832  452984832 STATIC
large pool
    16777216   16777216 STATIC
java pool
    16777216   16777216 STATIC
streams pool
           0          0 STATIC
DEFAULT buffer cache
  1644167168 1644167168 INITIALIZING
KEEP buffer cache
           0          0 STATIC
RECYCLE buffer cache
           0          0 STATIC
DEFAULT 2K buffer cache
           0          0 STATIC
DEFAULT 4K buffer cache
           0          0 STATIC
DEFAULT 8K buffer cache
           0          0 STATIC
DEFAULT 16K buffer cache
           0          0 STATIC
DEFAULT 32K buffer cache
           0          0 STATIC
ASM Buffer Cache
           0          0 STATIC

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值