ORACLE 12C 内存手动和自动管理的切换
一、手动管理内存改为自动管理内存
ALTER SYSTEM SET MEMORY_TARGET = 10240M SCOPE=SPFILE; #MEMORY_TARGET小于等于memory_max_target,二者均为0时为 手动管理内存
ALTER SYSTEM SET memory_max_target = 15000M SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET = 0 SCOPE=SPFILE; #SGA_TARGET和PGA_AGGREGATE_TARGET为0时 为自动管理内存
ALTER SYSTEM SET SGA_MAX_SIZE=800M SCOPE=SPFILE;
ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 SCOPE=SPFILE;
alter system set pre_page_sga=FALSE scope=spfile; #启动实例时,不加载全部SGA
二、自动管理内存改为手动管理内存
ALTER SYSTEM SET MEMORY_TARGET = 0 SCOPE=SPFILE; #MEMORY_TARGET小于等于memory_max_target,二者均为0时为 手动管理内存
ALTER SYSTEM SET memory_max_target = 0 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET = 1024M SCOPE=SPFILE; #SGA_TARGET和PGA_AGGREGATE_TARGET为0时 为自动管理内存
ALTER SYSTEM SET SGA_MAX_SIZE=2048M SCOPE=SPFILE;
ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 512M SCOPE=SPFILE;
alter system set pre_page_sga=TRUE scope=spfile; #启动实例时,加载SGA全部物理内存。