undo_retention
Seconds of committed undo Oracle tries to keep for consistent reads and flashback query.
- 默认
900- Range
- 0 to 2^32-1 seconds
- Restart needed
- 否
- Default checked on
- Oracle AI Database 26ai / 23ai
作用
With an autoextending undo tablespace Oracle tunes retention up to cover the longest query; with a fixed-size one it keeps as much as space allows. Retention is only guaranteed with ALTER TABLESPACE ... RETENTION GUARANTEE.
默认值
900. 900 seconds (Oracle 23ai/26ai).
Check the current value
SHOW PARAMETER undo_retention SELECT name, value, isdefault, issys_modifiable, isses_modifiable, ispdb_modifiable FROM v$parameter WHERE name = 'undo_retention';
Change it
ALTER SYSTEM SET undo_retention = 3600 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
When long reports fail with ORA-01555 (snapshot too old), or Flashback Query needs a longer window.
What can go wrong
Larger values need more undo space; with RETENTION GUARANTEE, DML can fail for lack of undo.
Questions about undo_retention
What is the default value of undo_retention in Oracle?
900. 900 seconds (Oracle 23ai/26ai).
Does changing undo_retention 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 undo_retention?
When long reports fail with ORA-01555 (snapshot too old), or Flashback Query needs a longer window.
Back to all Oracle settings, or check the Oracle manual for every option.
Check undo_retention 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.