Backup Recovery   «Prev  Next»

Lesson 4 Fast-start on-demand rollback
Objective Describe the steps to enable Fast-start on-demand Rollback

Fast-Start On-Demand Rollback Steps in Oracle

Fast-start on-demand rollback is a feature in Oracle 12c that allows for faster database recovery by prioritizing the rollback of critical transactions. Here are the steps to enable it:
  1. Start with the Initialization Parameters:
    • Set the `FAST_START_MTTR_TARGET` initialization parameter to a non-zero value to enable fast-start checkpointing, which is a prerequisite for fast-start on-demand rollback.
    • Optionally, adjust the `SMALL_TABLE_THRESHOLD` to define what Oracle considers a small table for caching purposes during recovery.
  2. Evaluate and Set Undo Parameters:
    • Use the `UNDO_MANAGEMENT` parameter to set undo management to `AUTO`, which is required for on-demand rollback.
    • Ensure `UNDO_TABLESPACE` is defined and points to an appropriately sized undo tablespace.
    • Consider setting the `UNDO_RETENTION` parameter to an appropriate value to meet your recovery point objectives.
  3. Enable Row Locking:
    • Confirm that row-level locking is enabled (the default behavior), as it is necessary for the on-demand rollback to function correctly.
  4. Monitor Recovery Progress:
    • Use the `V$SESSION` view to monitor sessions that are rolling back transactions. Look for sessions with a `ROLLBACK` command in the `EVENT` column.
    • The `V$FAST_START_TRANSACTIONS` view provides information about transactions that are being recovered and can help identify which ones will benefit from the on-demand rollback.
  5. Use the Recovery Advisor:
    • Optionally, use the Oracle Recovery Advisor to analyze any potential issues and to receive recommendations for optimizing recovery settings, including on-demand rollback.
  6. Testing and Validation:
    • Test the configuration by simulating failure scenarios in a non-production environment to ensure that on-demand rollback behaves as expected.
  7. Performance Tuning (if needed):
    • If the recovery performance is not as expected, consider tuning the related parameters, such as `FAST_START_MTTR_TARGET`, or examining the I/O performance of the underlying storage.
  8. Implementing in Production:
    • Once validated, implement the changes in the production environment during a scheduled maintenance window.
  9. Regularly Review and Adjust:
    • Regularly review the performance of the fast-start on-demand rollback feature and adjust the parameters as needed to adapt to changing workloads and recovery objectives.

Remember to consult the Oracle Database Administrator's Guide for detailed instructions and considerations specific to your environment when enabling and configuring fast-start on-demand rollback.
Rollback segments record the transactions that must be undone during certain database operations. These segments are used to identify and undo transactions that were never committed, but were either saved to the datafiles before the failure, or were applied to the database during the roll forward. This process is called rolling back or transaction recovery and Oracle can roll back multiple transactions simultaneously. All the transactions that were active during or before the failure of a database are marked DEAD during recovery, and can have locks on certain records. Instead of waiting for the DEAD transactions to be rolled back, the new transactions can recover the blocking transactions to obtain the locks they need. Fast-start-on-demand rollback recovers the necessary locks, leaving the rest of the DEAD transaction to be recovered in the background.
When a dead transaction holds a row lock on a row that another transaction needs, Fast-Start On-Demand Rollback immediately recovers only the data block under consideration, leaving the rest of the dead transaction to be recovered in the background. This improves the availability of the database for users accessing data that is locked by large dead transactions. If Fast-Start Rollback is not enabled, the user would have to wait until the entire dead transaction was recovered before obtaining the row lock.

Fast-Start means never having to wait for a long roll back

The availability of large dead transactions is improved for users trying to assess the locked data. If Fast-Start rollback were not enabled, the user would have to wait until the entire dead transaction was recovered before obtaining the row lock. Consequently, new transactions do not have to wait until all parts of a long transaction are rolled back. This increases the efficiency of the recovery of an instance.
Oracle performs on-demand rollback automatically. You do not need to set any parameters or issue commands to use this feature.
The next lesson demonstrates how to implement parallel rollback with the fast-start parallel rollback feature.

Fast-Start Parallel Rollback

Fast-Start Parallel Rollback allows a set of transactions to be recovered in parallel using a group of server processes. This technique is used when SMON determines that the amount of work it takes to perform recovery in parallel is less than the time it takes to recovery serially.