db_cache_size、shared_pool_size一些初始化参数为什么是0?
来源:互联网 发布:程序员该怎么建立博客 编辑:程序博客网 时间:2024/05/01 10:24
先来看一个“看起来”比较奇怪的现象
SQL> col name for a40
SQL> col value for a30
SQL> select name,value
2 from v$parameter
3 where name in
4 ('large_pool_size','java_pool_size','shared_pool_size','streams_pool_size',
'db_cache_size');
NAME VALUE
---------------------------------------- ------------------------------
shared_pool_size 0
large_pool_size 0
java_pool_size 0
streams_pool_size 0
db_cache_size 0
怎么回事,怎么会都是0呢?上REFERENCES查一下db_cache_size这个参数,其中有一句话如下:
If SGA_TARGET
is set: If the parameter is not specified, then the default is 0
(internally determined by the Oracle Database). If the parameter is specified, then the user-specified value indicates a minimum value for the memory pool.
这下就很清楚了吧,因为使用了10G ASSM自动共享内存管理。
那么如何查看系统在某个时刻这些参数到底被自动的调整到了什么值呢?
SQL> select x.ksppinm name,y.ksppstvl value,x.ksppdesc describ
2 from sys.x$ksppi x,sys.x$ksppcv y
3 where x.inst_id=userenv('Instance')
4 and y.inst_id=userenv('Instance')
5 and x.indx=y.indx
6 and x.ksppinm like '%pool_size%'
7 /
NAME VALUE DESCRIB
-------------------- ---------- ----------------------------------------
_NUMA_pool_size Not specif aggregate size in bytes of NUMA pool
ied
__shared_pool_size 79691776 Actual size in bytes of shared pool
shared_pool_size 0 size in bytes of shared pool
__large_pool_size 4194304 Actual size in bytes of large pool
large_pool_size 0 size in bytes of large pool
__java_pool_size 4194304 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
NAME VALUE DESCRIB
-------------------- ---------- ----------------------------------------
_io_shared_pool_size 4194304 Size of I/O buffer pool from SGA
_backup_io_pool_size 1048576 memory to reserve from the large pool
global_context_pool_ Global Application Context Pool Size in
size Bytes
olap_page_pool_size 0 size of the olap page pool in bytes
13 rows selected.
SQL> edit
Wrote file afiedt.buf
1 select x.ksppinm name,y.ksppstvl value,x.ksppdesc describ
2 from sys.x$ksppi x,sys.x$ksppcv y
3 where x.inst_id=userenv('Instance')
4 and y.inst_id=userenv('Instance')
5 and x.indx=y.indx
6* and x.ksppinm like '%db_cache_size%'
SQL> /
NAME VALUE DESCRIB
-------------------- ---------- ----------------------------------------
__db_cache_size 83886080 Actual size of DEFAULT buffer pool for s
tandard block size buffers
db_cache_size 0 Size of DEFAULT buffer pool for standard
block size buffers
从上面结果中黑体部分可以看到,这些由两个下划线开头的参数决定了当前SGA的分配,也是动态内存管理调整的参数。这些参数的更改会被记录到SPFILE文件中,在下一次数据库启动时仍然有效。
通过ORACLE 10G新增加的动态视图v$sga_dynamic_components,可以看各个动态组件调整的时间和调整类型等信息。
SQL> select component,current_size,min_size,last_oper_type,
2 last_oper_mode,to_char(last_oper_time,'yyyy-mm-dd hh24:mi:ss') LOT
3 from v$sga_dynamic_components
4 /
COMPONENT CURRENT_SIZE MIN_SIZE LAST_OPER_TYP LAST_OPER LOT
-------------------- ------------ ---------- ------------- --------- -----------
--------
shared pool 79691776 75497472 GROW IMMEDIATE 2009-11-25
20:11:08
large pool 4194304 4194304 STATIC
java pool 4194304 4194304 STATIC
streams pool 0 0 STATIC
DEFAULT buffer cache 83886080 83886080 SHRINK IMMEDIATE 2009-11-25
20:11:08
KEEP buffer cache 0 0 STATIC
RECYCLE buffer cache 0 0 STATIC
DEFAULT 2K buffer ca 0 0 STATIC
che
DEFAULT 4K buffer ca 0 0 STATIC
COMPONENT CURRENT_SIZE MIN_SIZE LAST_OPER_TYP LAST_OPER LOT
-------------------- ------------ ---------- ------------- --------- -----------
--------
che
DEFAULT 8K buffer ca 0 0 STATIC
che
DEFAULT 16K buffer c 0 0 STATIC
ache
DEFAULT 32K buffer c 0 0 STATIC
ache
COMPONENT CURRENT_SIZE MIN_SIZE LAST_OPER_TYP LAST_OPER LOT
-------------------- ------------ ---------- ------------- --------- -----------
--------
ASM Buffer Cache 0 0 STATIC
13 rows selected.
- db_cache_size、shared_pool_size一些初始化参数为什么是0?
- db_cache_size、shared_pool_size一些初始化参数为0?!
- db_cache_size、shared_pool_size…
- Oracle_学习笔记_查看ORACLE11G中 db_cache_size shared_pool_size等参数
- 修改参数SHARED_POOL_SIZE ,JAVA_POOL_SIZE
- DB_cache_size
- OCP考题解析_043:Oracle 参数shared_pool_size
- Oracle11g一些重要的初始化参数
- db_cache_size 优化
- 如何区分一个初始化参数是静态还是动态的
- 【Oracle 真2系列】初始化参数是静态 & 动态
- 记录一些杂事(二维数组初始化、参数传递)
- 关于 Data Guard 环境配置的一些初始化参数
- Spark PG1. 概述,连接Spark, 初始化,一些命令参数
- bootstrap fileinput初始化时的一些参数说明
- 为什么printf的参数是从右向左压栈
- 为什么QueryInterface最后一个参数是(void**),而不是(void*)
- c++拷贝构造函数参数为什么只能是引用
- 利用InstallShield12制作安装包之三:判断操作系统类型的多种方法
- VC++中什么是BSTR、LPSTR以及LPWSTR呢
- POJ2418
- Eclipse3.2.2中安装Spring IDE2.0.1
- POJ2632
- db_cache_size、shared_pool_size一些初始化参数为什么是0?
- 2440PWMTimer启动流程
- 明朝时代
- Word效率工具(WET)
- 日本产业研究--读后感二 关于原材料和组装加工业 从钢铁到切割钢铁的。嘿嘿
- 经常下载的朋友注意了,教你怎样硬盘零伤害!
- C++ 资源网站
- 去配眼镜
- Ubuntu下mysql修改字符集