shared_pool_size
Minimum size of the shared pool, which holds the library cache, dictionary cache and server-side PL/SQL state.
- 預設
0- Range
- 0, or a value inside the SGA up to sga_max_size
- Restart needed
- 否
- Default checked on
- Oracle AI Database 26ai / 23ai
其作用
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.
預設值
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.
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.
本頁文字與資料: CC BY 4.0,請註明出處 SQLly (sqlly.app)。 程式碼與 SQL 片段: MIT. 授權詳情