Undo data -Definition,Features - Oracle Tablespaces

Q.  The UNDO_RETENTION parameter in your database is set to 1000 and undo retention is not guaranteed. Which statement regarding retention of undo data is correct?

- Published on 19 Oct 15

a. Undo data becomes obsolete after 1,000 seconds
b. Undo data gets refreshed after every 1,000 seconds
c. Undo data will be stored permanently after 1,000 seconds
d. Committed undo data would be retained for 1,000 seconds if free undo space is available
e. Undo data will be retained in the UNDO tablespace for 1,000 seconds, then it gets moved to the TEMPORARY tablespace to provide read consistency

ANSWER: Committed undo data would be retained for 1,000 seconds if free undo space is available
 

    Discussion

  • Nirja Shah   -Posted on 01 Oct 15
    - After a transaction is committed, undo data is no longer needed for rollback or transaction recovery purposes.

    - However, for consistent read purposes, long-running queries may require this old undo information for producing older images of data blocks.

    - Furthermore, the success of several Oracle Flashback features can also depend upon the availability of older undo information.

    - For these reasons, it is desirable to retain the old undo information for as long as possible.

    - When automatic undo management is enabled, there is always a current undo retention period, which is the minimum amount of time that Oracle Database attempts to retain old undo information before overwriting it.

    - Old (committed) undo information that is older than the current undo retention period is said to be expired.

    - Old undo information with an age that is less than the current undo retention period is said to be unexpired.

    - Oracle Database automatically tunes the undo retention period based on undo tablespace size and system activity.

    - You can specify a minimum undo retention period (in seconds) by setting the UNDO_RETENTION initialization parameter.

    - The database makes its best effort to honor the specified minimum undo retention period, provided that the undo tablespace has space available for new transactions.

    - When available space for new transactions becomes short, the database begins to overwrite expired undo.

    - If the undo tablespace has no space for new transactions after all expired undo is overwritten, the database may begin overwriting unexpired undo information.

    - If any of this overwritten undo information is required for consistent read in a current long-running query, the query could fail with the snapshot too old error message.

    - The following points explain the exact impact of the UNDO_RETENTION parameter on undo retention:

    1. The UNDO_RETENTION parameter is ignored for a fixed size undo tablespace.
    - The database may overwrite unexpired undo information when tablespace space becomes low.

    2. For an undo tablespace with the AUTOEXTEND option enabled, the database attempts to honor the minimum retention period specified by UNDO_RETENTION.
    - When space is low, instead of overwriting unexpired undo information, the tablespace auto-extends.
    - If the MAXSIZE clause is specified for an auto-extending undo tablespace, when the maximum size is reached, the database may begin to overwrite unexpired undo information.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)