SQL> show parameter db_cache
NAME
TYPEVALUE
------------------------------------ ----------- ------------------------------
db_cache_advice
stringON
db_cache_size
big integer 12582912
SQL> show sga
Total System Global Area 68229684 bytes
Fixed Size
453172 bytes
Variable Size
54525952 bytes
Database Buffers 12582912 bytes
Redo Buffers
667648 bytes
SQL> alter system set db_cache_size=8m;
系统已更改。
SQL> show sga
Total System Global Area 68229684 bytes
Fixed Size
453172 bytes
Variable Size
58720256 bytes
Database Buffers
8388608 bytes
Redo Buffers
667648 bytes
SQL> show parameter db_cache
NAME
TYPEVALUE
------------------------------------ ----------- ------------------------------
db_cache_advice
stringON
db_cache_size
big integer 8388608
SQL>
所以是有效的。
alter system set xxx=xxx scope=spfile,只在spfile参数文件修改,要重启数据库修改才生效
alter system set xxx=xxx scope=both,既修改当前实例,又在spfile参数文件修改.
alter system set xxx=xxx scope=memory只修改当前实例,不在spfile参数文件做修改
另外,修改静态参数,scope只能是指定spfile,否则会报错,要重启才能生效.
如果不指定scope,默认是both.
俺改的是large_pool_size
SQL> show sga
Total System Global Area202868968 bytes
Fixed Size
731368 bytes
Variable Size
184549376 bytes
Database Buffers 16777216 bytes
Redo Buffers
811008 bytes
SQL> alter system set large_pool_size=0m;
System altered.
SQL> show sga
Total System Global Area202868968 bytes
Fixed Size
731368 bytes
Variable Size
184549376 bytes
Database Buffers 16777216 bytes
Redo Buffers
811008 bytes
SQL> show parameter large
NAME
TYPE
------------------------------------ ----------------------
VALUE
------------------------------
large_pool_size
big integer
16777216