欢迎投稿

今日深度:

oracle undo读书笔记

oracle undo读书笔记


跟undo 相关的两个参数:

undo_tablespace

UNDO_MANAGEMENT =auto

在oracle 9i 以后 oracle 推荐我们使用 undo 自动管理;

undo_retention

这个参数用来保证undo 回滚段中的内容不会被覆盖。但是这个参数使用时要和 undo 的大小设置(maxsize ,unlimit )一起考虑。

否则是 无意义的。

当undo tbs 大小一定时,设置undo_retention 参数无任何意义。oracle 不会保证undo中内容在 undo retention 设置的时间间隔内不被复写。

undo 中内容的持久性,直接会影响 oracle 的一致性读,闪回特性,long-running query。
 

启用 undo—retention:

在建库create database or create undo tablespace 时指定 RETENTION GUARANTEE;

alter tablespace 设置;

使用 alter tablespace 可以禁用 undo—retention

aler tablespace xxx RETENTION NOGUARANTEE

oracle 会自动调整 undo retention ,但是不支持 lob 字段, undo information for LOBs is stored in the segment
itself and not in the undo tablespace

如何确定当前undo 的保留策略:

select to_char(begin_time, 'DD-MON-RR HH24:MI') begin_time,
to_char(end_time, 'DD-MON-RR HH24:MI') end_time, tuned_undoretention
from v$undostat order by end_time;

如何设置undo_retention

ALTER SYSTEM SET UNDO_RETENTION = 2400;

该参数可以动态设置,立即生效,但是不能保证oracle 一定会遵守我们设置的要求,一切前提以 undo 的大小设置参数为准,以及是否设置 retention guarantee

 

www.htsjk.Com true http://www.htsjk.com/oracle/22664.html NewsArticle oracle undo读书笔记 跟undo 相关的两个参数: undo_tablespace UNDO_MANAGEMENT =auto 在oracle 9i 以后 oracle 推荐我们使用 undo 自动管理; undo_retention 这个参数用来保证undo 回滚段中的内容不会被覆盖...
评论暂时关闭