这是一个动态参数,很脆弱,可以被各种情况弄死,大概就是仅供参考的意思。
For AUTOEXTEND undo tablespaces, the system retains undo for at least the time specified in this parameter, and automatically tunes the undo retention period to satisfy the undo requirements of the queries. For fixed- size undo tablespaces, the system automatically tunes for the maximum possible undo retention period, based on undo tablespace size and usage history, and ignores UNDO_RETENTION unless retention guarantee is enabled.
对于undo 表空间,系统会尽量保留undo数据至少为undo_retention设置的时间,并且也会自动的调整undo 保留期,来满足查询的undo需求。对于固定的undo表空间,系统会根据撤销表空间大小和使用历史自动调整为最大的undo保留期,这个时候会忽略UNDO_RETENTION参数,除非retention guarantee 是可用的。
alter set system set undo_retention=guarantee;强制保留到undo_retention设置的时间。
The setting of this parameter should account for any flashback requirements of the system. Automatic tuning of undo retention is not supported for LOBs. The RETENTION value for LOB columns is set to the value of the UNDO_RETENTION parameter.
这个参数的设置应考虑系统任何的闪回需求。undo retention的自动调整不被LOBs支持。LOB列的RENTENTION值会被设置成undo_retention参数的值。
The UNDO_RETENTION parameter can only be honored if the current undo tablespace has enough space. If an active transaction requires undo space and the undo tablespace does not have available space, then the system starts reusing unexpired undo space. This action can potentially cause some queries to fail with a “snapshot too old” message.
只有当undo表空间有足够的空间时,才能遵守undo_retention参数,如果活动的事务需要undo空间但是undo 表空间没有足够的可用空间,系统就是重用unexpired状态的undo空间,这个行为将会导致某些查询因为“snapshot too old”消息而失败。
undo 有active、unexpired、expired状态。active是事务未被提交,所以不会被覆盖,unexpired是提交了,但是该数据还没有超出undo_retention 设置的保留时间,而expired 则是数据已经提交,而且还超出了undo_retention时间,这个随时可以被覆盖,而且优先被覆盖。
大概就是早提交,早覆盖。
The amount of time for which undo is retained for the Oracle Database for the current undo tablespace can be obtained by querying the TUNED_UNDORETENTION column of the V$UNDOSTAT dynamic performance view.
通过查询V$UNDOSTAT动态性能视图的TUNED_UNDORETENTION列,可以获得当前还原表空间为Oracle数据库保留还原的时间。