memory_target
Total memory for SGA and PGA together under Automatic Memory Management (AMM); 0 disables AMM.
- Padrão
0 (AMM off)- Range
- 0, or 152MB up to memory_max_target
- Restart needed
- Não
- Default checked on
- Oracle AI Database 26ai / 23ai
O que faz
With AMM, Oracle moves memory between SGA and PGA as the workload shifts. It can be changed online only up to memory_max_target, which is static, so turning AMM on from 0 means setting memory_max_target and memory_target with SCOPE=SPFILE and restarting (otherwise ORA-00837). On Linux, /dev/shm must be at least memory_max_target.
Valor padrão
0 (AMM off). 0 (Oracle 23ai/26ai).
Check the current value
SHOW PARAMETER memory_target SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'memory_target';
Change it
ALTER SYSTEM SET memory_target = 3G SCOPE=BOTH;
No restart to resize it while AMM is on, up to memory_max_target. Turning AMM on from 0 needs memory_max_target and memory_target set with SCOPE=SPFILE and a restart. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.
When to change it
On small or test systems where simplicity matters more than the last bit of performance. On Linux production servers most DBAs use sga_target plus pga_aggregate_target instead.
What can go wrong
AMM cannot use Linux HugePages, so a large SGA pays for small-page tables. It is not available on some platforms.
Questions about memory_target
What is the default value of memory_target in Oracle?
0 (AMM off). 0 (Oracle 23ai/26ai).
Does changing memory_target require a restart?
No. No restart to resize it while AMM is on, up to memory_max_target. Turning AMM on from 0 needs memory_max_target and memory_target set with SCOPE=SPFILE and a restart. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.
When should I change memory_target?
On small or test systems where simplicity matters more than the last bit of performance. On Linux production servers most DBAs use sga_target plus pga_aggregate_target instead.
Back to all Oracle settings, or check the Oracle manual for every option.
Check memory_target on your own server
SQLly runs the query above against Oracle and the other engines in this reference, from one desktop app on macOS, Windows and Linux.