After completing this lesson, you should be able to do the following:
Describe the concept of automaticundo management
Create and maintain the automatic managedundo tablespace
Set the retention period
Use dynamic performance views to check rollback segment performance
Reconfigure and monitor rollback segments
Define the number and sizes of rollback segments
Allocate rollback segments to transactions
Managing Undo Data
Automatic Undo Management
The Oracle server automatically manages the creation, allocation, and tuning of undo segments.
Manual Undo Management
You manually manage the creation, allocation, and tuning of undo segments. It was the only method available prior to Oracle9i. Information about manual undo management can be found in “Appendix B: Manually Managing Undo Data.”
Allocation of a Rollback Segment
When a transaction begins, a rollback segment must be assigned to this transaction. A transaction can request a specific rollback segment using the following command:
SET TRANSACTION USE ROLLBACK SEGMENT rollback_segment
If no such request is made, the Oracle server chooses the rollback segment with the fewest transactions and assigns it to the transaction.
Transactions use extents of a rollback segment in a sequential, circular fashion, moving from one to the next after the current extent is full.
Using Online Redo Log Files
Online redo log files provide the means to redo transactions in the event of a database failure. Every transaction is written synchronously to the Redo Log Buffer, then gets flushed to the online redo log files in order to provide a recovery mechanism in case of media failure. (With exceptions such as direct load inserts in objects with the NOLOGGING clause enabled.) This includes transactions that have not yet been committed, undo segment information, and schema and object management statements.