Managing Undo Data 管理UNDO数据

you should be able to: 1、Explain DML and undo data generation 2、Monitor and administer undo data 3、Describe the difference between undo data and redo data 4、Configure undo retention 5、Guarantee undo retention 6、Use the Undo Advisor

Undo data is: A copy of original, premodified data Captured for every transaction that changes data Retained at least until the transaction is ended Used to support: Rollback operations Read-consistent queries Oracle Flashback Query, Oracle Flashback Transaction, and Oracle Flashback Table Recovery from failed transactions

有undo表空间,以段的方式存储.

Undo information is stored in undo segments, which are stored in an undo tablespace. Undo tablespaces: Are used only for undo segments Have special recovery considerations May be associated with only a single instance Require that only one of them be the current writable undo tablespace for a given instance at any given time

Managing Undo Automatic undo management: Fully automated management of undo data and space in a dedicated undo tablespace For all sessions Self-tuning in AUTOEXTEND tablespaces to satisfy long-running queries Self-tuning in fixed-size tablespaces for best retention DBA tasks in support of Flashback operations: Configuring undo retention Changing undo tablespace to a fixed size Avoiding space and “snapshot too old” errors 快照过旧

Configuring Undo Retention UNDO_RETENTION specifies (in seconds) how long already committed undo information is to be retained. The only time you must set this parameter is when: The undo tablespace has the AUTOEXTEND option enabled You want to set undo retention for LOBs You want to guarantee retention

Guaranteeing Undo Retention SQL> ALTER TABLESPACE undotbs1 RETENTION GUARANTEE;