SQL> show parameter sga;
NAME TYPE VALUE
----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 2G
sga_target big integer 2G
更改SGA大小:
SQL> alter system set sga_max_size=4096M scope=spfile; System altered. SQL> alter system set sga_target=4096M scope=spfile; System altered.
如果是RAC环境,需要这样增加sid='*':
alter system set sga_target=20G scope=spfile sid='*';
重启使更改生效:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 4294967296 bytes
Fixed Size 2026296 bytes
Variable Size 805307592 bytes
Database Buffers 3472883712 bytes
Redo Buffers 14749696 bytes
Database mounted.
Database opened.
SQL> show parameter sga;
NAME TYPE VALUE
----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 4G
sga_target big integer 4G