Database Reference
In-Depth Information
query at 10 a.m. and it finished at 10:15 a.m., the data should not reflect changes (commit-
ted or uncommitted) made by other users in the interim.
To fulfill this requirement, Oracle must retain undo records after their associated transac-
tion has been committed. The length of time that it chooses to retain this data is governed
by the undo retention period, which will be covered later in this chapter.
Flashback functions allow users to view elements of the database as they appeared at a cer-
tain point in time. These functions will be described in much more detail later in this chapter.
Much like the read-consistency requirements, Flashback requires that undo records be
retained for a period of time after the associated transaction has completed.
In short, the undo feature creates and maintains records of all transactions that
occur in the database and stores the data necessary to undo them. By maintaining these
records throughout the life of a transaction, undo provides transaction management
and read-consistency capabilities. By maintaining these records after the transaction has
been committed, undo provides read-consistency and Flashback options.
Working with Automatic Undo Management
Undo data is temporary. In that respect, the undo tablespace is similar to a temporary
tablespace. Information is written there to fulfill a temporary need. As soon as the infor-
mation is no longer needed, it can be removed to make room for new undo data. Keeping
things running smoothly requires a considerable amount of management. Luckily, Oracle
offers the Automatic Undo Management feature.
Automatic Undo Management (AUM) is a feature whereby Oracle will handle all undo
management tasks without interaction from the DBA. AUM is not a new feature in Oracle
Database 12 c ; beginning with Oracle Database 11 g , AUM is enabled by default. In prior
Oracle versions, manual undo management was the default setting.
When creating a new database with the Database Configuration Assistant (DBCA),
Oracle will perform the following actions:
1. Create an undo tablespace named UNDOTBS1 .
2. Configure the undo tablespace to autoextend.
3. Add an UNDO_MANAGEMENT=AUTO initialization parameter.
These three steps ensure that Oracle will automatically manage the undo needs for the
database.
Automatic Undo Management must ensure that Oracle can store undo information for
all new transactions as they occur. This means that adequate space must be available in the
undo tablespace.
By creating an autoextending undo tablespace, Oracle can extend the size as needed to
maintain adequate undo information.
So how long should Oracle retain committed undo information? The simple answer is,
long enough to satisfy the undo retention period. The undo retention period represents the
minimum amount of time that Oracle will attempt to retain committed undo information
before allowing it to be overwritten.
Search WWH ::




Custom Search