sessions
Maximum sessions; derived from processes when not set.
- 預設
1.5 x processes + 22- Range
- 1 to 65536
- Restart needed
- 是
- Default checked on
- Oracle AI Database 26ai / 23ai
其作用
One process can host several sessions (shared server, recursive sessions), so sessions is higher than processes.
預設值
1.5 x processes + 22. Derived as (1.5 x processes) + 22 (Oracle 23ai/26ai): 322 with processes = 200, as on Oracle Free.
Check the current value
SHOW PARAMETER sessions SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'sessions';
Change it
ALTER SYSTEM SET sessions = 1522 SCOPE=SPFILE; -- then SHUTDOWN IMMEDIATE and STARTUP
Restart required at the instance level: V$PARAMETER reports ISSYS_MODIFIABLE = IMMEDIATE, but in CDB$ROOT ALTER SYSTEM accepts only SCOPE=SPFILE (SCOPE=MEMORY fails with ORA-00046). Inside a PDB, ALTER SYSTEM SET sessions = n SCOPE=BOTH sets a per-PDB cap immediately, no higher than the CDB value (ORA-00047 otherwise).
When to change it
Usually leave it derived and change processes instead.
What can go wrong
Setting it below the derived value can cause ORA-00018 under load.
Questions about sessions
What is the default value of sessions in Oracle?
1.5 x processes + 22. Derived as (1.5 x processes) + 22 (Oracle 23ai/26ai): 322 with processes = 200, as on Oracle Free.
Does changing sessions require a restart?
Yes. Restart required at the instance level: V$PARAMETER reports ISSYS_MODIFIABLE = IMMEDIATE, but in CDB$ROOT ALTER SYSTEM accepts only SCOPE=SPFILE (SCOPE=MEMORY fails with ORA-00046). Inside a PDB, ALTER SYSTEM SET sessions = n SCOPE=BOTH sets a per-PDB cap immediately, no higher than the CDB value (ORA-00047 otherwise).
When should I change sessions?
Usually leave it derived and change processes instead.
Back to all Oracle settings, or check the Oracle manual for every option.
Check sessions 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.