Database Reference
In-Depth Information
In Oracle Database 12 c , if the UNDO_MANAGEMENT initialization parameter
is set to NULL or omitted, the database will default to AUTO . Please note
that it is still possible to run the database in manual undo management
mode. This can be done by changing the initialization parameter to UNDO_
MANAGEMENT=MANUAL . However, Oracle strongly advises against it.
Preserving Data with Undo Retention
The undo functionality of Oracle Database 12 c is governed by a setting known as the
undo retention period. The undo retention period represents the minimum time (expressed
in seconds) that committed undo information should be retained in the undo tablespace.
To ensure read consistency, the undo retention period should be set to a value larger than
the runtime of your longest-running query. If your longest-running query takes 60 minutes
to run and you retain undo information for 65 minutes, your system should not encounter
any ORA-01555 Snapshot too old errors.
To make sure that undo data is available for Flashback operations, the undo retention
period should be set long enough to retain adequate data to support your Flashback needs.
For example, if you want to always maintain a 4-hour window in which to undo data
changes, then the setting should be at least 14400 (4 hours expressed in seconds).
It is important to understand that the undo retention setting is actually a target for AUM
to achieve; it does not guarantee that data will actually be retained for the entire time. There
are circumstances under which AUM may choose to violate the undo retention period, for
example, if the undo tablespace is a fixed size and is not large enough to accommodate com-
mitted transaction data for the retention period.
Undo data is considered to be in one of three possible states at any given time: uncom-
mitted, unexpired, or expired.
Uncommitted State Uncommitted data is undo data corresponding to a transaction that
has been neither committed nor rolled back. Undo data in this state will remain in the undo
tablespace indefinitely. It will never be removed based on the retention period.
Unexpired State Once data has been committed, it enters the unexpired state. This effec-
tively starts the timer running on the retention-period clock. It will remain in this state until
the retention period has elapsed.
Expired State When the retention period has elapsed, the data will enter the expired state,
meaning the data has been retained for the requested amount of time. The expired state tells
Oracle that the data is now eligible to be purged from the undo tablespace to make room for
new data.
By keeping track of the state of all undo data, AUM can manage the space and ensure
adequate space for new transactions. But suppose a new transaction begins when the
undo tablespace is full and none of the undo data is expired? Oracle will attempt to
extend the tablespace (if it is enabled) to make more space. If autoextend is not possible
Search WWH ::




Custom Search