Oracle 11g 只要设置 memory 就可以了。不需要单独对 sga_max_size 进行设置,
设置memory_max_target、memory_target 一般原则是 物理内存的1/2。设好了重启实例,sga_max_size 将自动变成memory_max_target设置的值
memory_max_target < shm 切记,否则Oracle实例将启动失败,报
ORA-00845: MEMORY_TARGET not supported on this system 错,点击查看shm设置
------------------------------
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 512M
sga_target big integer 512M
SQL>
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 0
memory_target big integer 0
shared_memory_address integer 0
SQL>
sql>alter system set memory_max_target = 15G scope=spfile;
sql>alter system set memory_target = 15G scope=spfile;
shutdown immediate
startup
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 15G
memory_target big integer 15G
shared_memory_address integer 0
SQL>