# memory_max_target

> Hard ceiling on memory_target under AMM: the most SGA plus PGA memory the instance may grow to without a restart.

Source: https://sqlly.app/sql-configuration/oracle/memory-max-target
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).

**Default**

`0`

**Range**

0, or a platform-dependent minimum up to physical memory

**Restart needed**

Yes

**Default checked on**

Oracle AI Database 26ai / 23ai

## What it does

Setting it above memory_target leaves room to raise memory_target online later. With both at 0, AMM is off. On Linux the value must fit in /dev/shm or the instance fails with ORA-00845, and ORA-00837 reports a memory_target set above this ceiling.

## Default value

`0`. 0, which makes memory_target its own ceiling (Oracle 23ai/26ai).

## Check the current value

```
SHOW PARAMETER memory_max_target

SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable
FROM v$parameter
WHERE name = 'memory_max_target';

-- What the SPFILE holds, which is what applies at the next startup:
SELECT value FROM v$sppparameter WHERE name = 'memory_max_target';
```

## Change it

```
ALTER SYSTEM SET memory_max_target = 6G SCOPE=SPFILE;
-- then SHUTDOWN IMMEDIATE and STARTUP
```

Restart required: the parameter is static (ISSYS_MODIFIABLE = FALSE), so only SCOPE=SPFILE is accepted and the value applies at the next startup. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.

## When to change it

Before enabling AMM, because memory_target cannot rise above it, and to keep headroom for online growth afterwards.

## What can go wrong

It reserves nothing on its own, but a ceiling below what you actually plan to use kills the headroom, and AMM still cannot use HugePages.

## Questions about memory_max_target

### What is the default value of memory_max_target in Oracle?

0. 0, which makes memory_target its own ceiling (Oracle 23ai/26ai).

### Does changing memory_max_target require a restart?

Yes. Restart required: the parameter is static (ISSYS_MODIFIABLE = FALSE), so only SCOPE=SPFILE is accepted and the value applies at the next startup. It is instance-wide: set it from CDB$ROOT, because a PDB gets ORA-65040.

### When should I change memory_max_target?

Before enabling AMM, because memory_target cannot rise above it, and to keep headroom for online growth afterwards.

Back to all [Oracle settings](https://sqlly.app/sql-configuration/oracle), or check the [Oracle manual](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/initialization-parameters.html) for every option.

## Related Oracle settings

- [`memory_target` Total memory for SGA and PGA together under Automatic Memory Management (AMM); 0 disables AMM.](https://sqlly.app/sql-configuration/oracle/memory-target)
- [`sga_max_size` Largest the SGA can grow to without a restart.](https://sqlly.app/sql-configuration/oracle/sga-max-size)

## Related on SQLly

- [Memory pressure Performance guide](https://sqlly.app/sql-performance/memory-pressure)
- [Oracle query performance troubleshooting Performance guide](https://sqlly.app/sql-performance/oracle)
