1、查看已分配内存,看到memory_max_target为20G
SQL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean TRUE
sga_max_size big integer 12G
sga_target big integer 0
unified_audit_sga_queue_size integer 1048576
SQL> show parameter target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target integer 0
db_big_table_cache_percent_target string 0
db_flashback_retention_target integer 1440
fast_start_io_target integer 0
fast_start_mttr_target integer 0
memory_max_target big integer 20G
memory_target big integer 20G
parallel_servers_target integer 128
pga_aggregate_target big integer 0
sga_target big integer 0
2、修改memory_max_target为12G后需重启数据库,注意要小于物理内存的3/4否则oracle无法启动,以下是修改步凑:
[oracle@pdjg6 ~]$ sqlplus / as sysdba
SQL> alter system set memory_max_target = 12G scope = spfile;
SQL> alter system set memory_target = 12G scope = spfile;
SQL> shutdown immediate;
SQL> startup;