417.When manually configuring the SGA, which of the following parameter changes requires an instance restart to take effect?
A. DB_CACHE_SIZE
B. SHARED_POOL_SIZE
C. LARGE_POOL_SIZE
D. JAVA_POOL_SIZE
E. SGA_MAX_SIZE
F. SORT_AREA_SIZE
Answer: E
答案解析:
sys@TEST1107> desc v$sgainfo
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
NAME VARCHAR2(32)
BYTES NUMBER
RESIZEABLE VARCHAR2(3)
RESIZEABLE 为YES,则可以在线更改,及时生效,如果为NO,则只能重启生效。
sys@TEST1107> select * from v$sgainfo;
NAME BYTES RES
-------------------------------- ---------- ---
Fixed SGA Size 2227984 No
Redo Buffers 8847360 No
Buffer Cache Size 352321536 Yes
Shared Pool Size 335544320 Yes
Large Pool Size 16777216 Yes
Java Pool Size 16777216 Yes
Streams Pool Size 16777216 Yes
Shared IO Pool Size 0 Yes
Granule Size 16777216 No
Maximum SGA Size 1269366784 No
Startup overhead in Shared Pool 97589480 No
Free SGA Memory Available 520093696
12 rows selected.
sys@TEST1107> alter system set sga_max_size=1200M;
alter system set sga_max_size=1200M
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
sys@TEST1107> alter system set sga_max_size=1200M scope=spfile;
System altered.
如果不加scope,则不能修改,如果加了scope=spfile,意味着重启后生效。
sys@TEST1107> alter system set large_pool_size=20M;
System altered.
sys@TEST1107> select * from v$sgainfo;
NAME BYTES RES
-------------------------------- ---------- ---
Fixed SGA Size 2227984 No
Redo Buffers 8847360 No
Buffer Cache Size 335544320 Yes
Shared Pool Size 335544320 Yes
Large Pool Size 33554432 Yes
Java Pool Size 16777216 Yes
Streams Pool Size 16777216 Yes
Shared IO Pool Size 0 Yes
Granule Size 16777216 No
Maximum SGA Size 1269366784 No
Startup overhead in Shared Pool 97589480 No
Free SGA Memory Available 520093696
12 rows selected.