Init parameterMemory
SGA_MAX_SIZE
What it controls
The most memory the SGA can grow to without a restart.
Know this before you change it
Set it a little above SGA_TARGET if you want room to grow the SGA online.
Check and change it
1-- Current value on every instance2SELECT inst_id, name, value, isdefault, ismodified3FROM gv$parameter4WHERE name = 'sga_max_size';5 6-- Value stored in the spfile7SELECT sid, value FROM v$spparameter WHERE name = 'sga_max_size' AND isspecified = 'TRUE';8 9-- Static: saved in the spfile, takes effect after a restart10ALTER SYSTEM SET sga_max_size = 20G SCOPE = SPFILE SID = '*';11 12-- Remove it from the spfile to go back to the default at the next restart13ALTER SYSTEM RESET sga_max_size SCOPE = SPFILE SID = '*';Open in the parameter referenceOracle's reference
More in Memory
- MEMORY_TARGETTotal memory for SGA and PGA together under Automatic Memory Management.
- MEMORY_MAX_TARGETUpper limit for MEMORY_TARGET.
- SGA_TARGETSize of the SGA under Automatic Shared Memory Management. Oracle moves memory between the buffer cache, shared pool and other pools as load changes.
- PGA_AGGREGATE_TARGETTarget for the total private memory of all server processes, used for sorts, hash joins and bitmap operations.
- PGA_AGGREGATE_LIMITHard limit on total PGA (12c and later). Above it, Oracle ends the calls or sessions using the most PGA with ORA-04036.
- SHARED_POOL_SIZESize of the shared pool: parsed SQL, PL/SQL and the dictionary cache. Under SGA_TARGET it's a minimum.
- DB_CACHE_SIZESize of the default buffer cache. Under SGA_TARGET it's a minimum.
- USE_LARGE_PAGESWhether the SGA is placed in Linux HugePages.
- INMEMORY_SIZESize of the In-Memory column store. On 12.2 and later it can be increased while the instance is running.