oracle 10g常见问题精选(3)
中华网科技 http://tech.china.com
2005-06-29 11:42:43
|
|
|
五、如何使用"Automatic SGA Management" Automatic SGA Management 是 10G 引入的新特性之一,将初始化参数文件中与内存管理密切有关的几个参数抽取出来,交由数据库去自行管理(由新增加的参数SGA_TARGET来管理),在一定程序上能减轻DBA的负担.
至于参数的合理性,还需要结合AWR Report 去验证. SGA_TARGET = db_cache_size + db_nk_cache_size(n=2,4,...) + db_keep_cache_size + db_recycle_cache_size + shared_pool_size + java_pool_size + large_pool_size + xxxx
xxx: 是一个保留值,从目前的实验来看,基本是4M
步骤: 1. alter system set sga_target=300m scope=both create pfile from spfile; shutdown immediate;
修改init.ora 文件,将这些参数的值设成0: db_cache_size, shared_pool_size, java_pool_size,large_pool_size
2. 启动SQLPLUS,以新的pfile文件启动数据库 SQL> startup pfile=‘....‘
让我们来看看调整的结果: SQL> select name, block_size, current_size from v$buffer_pool; name block_size current_size
-------------------------------------------------------------
KEEP 8192 204 SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$SGASTAT group by pool; pool M bytes
-------------------------------------------------
java pool 4
large pool 4
shared pool 84
205.002403 205.002403=buffer cache + log buffer + fixed sga + all others ...
改动java pool的值 SQL> alter system set java_pool_size=20M;
SQL> select name, block_size, current_size,prev_size from v$buffer_pool; name block_size current_size prev_size
----------------------------------------------------------------------------------------------
KEEP 8192 188 204 SQL> Select pool, sum(bytes)/1024/1024 as "M bytes" from v$SGASTAT group by pool; pool M bytes
-------------------------------------------------
java pool 20
large pool 4
shared pool 84
189.002403
首页 上页 | 1 | 2 | 3 | 4 | 5 | 下页 尾页 共 5 页
|