// oracle · memory

shared_pool_size

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

Standard
0
Range
0, or a value inside the SGA up to sga_max_size
Restart needed
Nein
Default checked on
Oracle AI Database 26ai / 23ai

Was es bewirkt

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.

Standardwert

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, or check the Oracle manual for every option.

// one client for every engine

Check shared_pool_size 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.

Text und Daten auf dieser Seite: CC BY 4.0, Quelle: SQLly (sqlly.app). Code und SQL-Snippets: MIT. Lizenzdetails