# shared_pool_size

> Minimum size of the shared pool, which holds the library cache, dictionary cache and server-side PL/SQL state.

Source: https://sqlly.app/sql-configuration/oracle/shared-pool-size
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 value inside the SGA up to sga_max_size

**Restart needed**

No

**Default checked on**

Oracle AI Database 26ai / 23ai

## What it does

With sga_target or memory_target set, an explicit value is a floor that automatic tuning cannot shrink below. Without them, the value fixes the pool and every other SGA component is sized manually too. Inside a PDB it guarantees that PDB a minimum share, which must stay below the root's value.

## Default value

`0`. 0, so ASMM or AMM sizes the pool when sga_target or memory_target is set (Oracle 23ai/26ai).

## Check the current value

```
SHOW PARAMETER shared_pool_size

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

## Change it

```
ALTER SYSTEM SET shared_pool_size = 2G SCOPE=BOTH;
```

No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

## When to change it

As a floor when ORA-04031 keeps hitting despite an adequate sga_target, or to guarantee a busy PDB its share of the SGA.

## What can go wrong

A high floor starves the buffer cache and other pools inside the same SGA, and a pool sized without ASMM never adapts or gives memory back.

## Questions about shared_pool_size

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

0. 0, so ASMM or AMM sizes the pool when sga_target or memory_target is set (Oracle 23ai/26ai).

### Does changing shared_pool_size require a restart?

No. No restart: ALTER SYSTEM with SCOPE=BOTH applies immediately and is saved in the SPFILE. It can be set inside a PDB (ISPDB_MODIFIABLE = TRUE).

### When should I change shared_pool_size?

As a floor when ORA-04031 keeps hitting despite an adequate sga_target, or to guarantee a busy PDB its share of the SGA.

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

- [`sga_target` Total SGA size under Automatic Shared Memory Management; Oracle divides it among buffer cache, shared pool and other pools.](https://sqlly.app/sql-configuration/oracle/sga-target)
- [`cursor_sharing` Whether literals in SQL are replaced by bind variables so statements share cursors.](https://sqlly.app/sql-configuration/oracle/cursor-sharing)
- [`open_cursors` Maximum open cursors per session.](https://sqlly.app/sql-configuration/oracle/open-cursors)

## 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)
