ITPub博客

首页 > 数字化转型 > ERP > 9i undo data 管理

9i undo data 管理

原创 ERP 作者:spaceair 时间:2005-01-26 19:10:27 0 删除 编辑

1. undo segment purpose
 a. transaction rollback
 b. read consistency
 c. transacton recovery

2. Types of undo segments
 a. system:used for objects in the system tablespace
 b. Non-system:used for objects in other tablespace
       --auto mode: require an UNDO tablespace
       --Manual mode:
            --Private: acquired by a single instance
            --Public: acquired by any instance
 c.deferred:used when tablespace are taken offline immediate,temporary

3.Automatic Undo Management concepts
 a.Undo data is managed using an undo tablespace
 b.You allocate one UNDO tablespace per instance with enough space for the workload of the instance
 c.The oracle server automatically maintains undo data within the UNDO tablespace

4.Automatic Undo management:configuration
 a.configure two parameters in the initialization file;
  --UNDO_management:specifies whether the system should use AUTO or MANUAL mode
  --UNDO_tablespace:specifies a particual
 b.create at least one undo tablespace.
注意:任何时候,虽然存在多个回滚段,但他们只能来自一个激活的undo表空间
--create undo tablespace
sql>create undo tablespace undotbs1 datafile 'd:oracleoradatahsmisundotbs1.dbf' size 10m;
--add datafile
sql>alter tablespace undotbs1 add datafile 'd:oracleoradatahsmisundotbs2.dbf' size 10m;
当前活动的undo tablespace无法执行的操作:offline,readonly

5.Automatic Undo management:
 SWITCHING
 a. you may switch from using one undo tablespace to another
 b. Only one UNDO tablespace can be in assigned to an instance at a time
 c. More than one UNDO tablespace may exist within an instance, but only one can be active
 d. Use the ALTER SYSTEM command for dynamic switching between UNDO tablespaces
    -- ALTER SYSTEM SET UNDO_TABLESPACE=UNDOTBS2;

 Dropping an UNDO tablespace
 a. The DROP TABLESPACE command drops an UNDO tablespace
    --DROP TABLESPACE UNDOTBS2;
 b. An UNDO tablespace can only be dropped if it is currently not in use by any instance.
 c. To drop an active UNDO tablespace:
    --switch to a new UNDO tablespace;
    --Drop the tablespace after all current transactions are complete
 
  Other parameters
  a. UNDO_SUPPRESS_ERRORS: set to TRUE,this parameter suppresses errors while attempting to execute manual operation in AUTO mode.
  b.UNDO_RETENTION: Controls the amount of undo data to retain for consistent read(保留时间:秒)
  oracle的“回闪”
  execute dbms_flashback.enable

6. obtianing undo segments information
  a. data dictionary views: DBA_ROLLBACK_SEGS
  b. dynamic performance views
    --V$ROLLNAME
    --V$ROLLSTAT
    --V$UNDOSTAT
    --V$SESSION
    --V$TRANSACTION

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/59630/viewspace-788511/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 伤逝
请登录后发表评论 登录
全部评论
  • 博文量
    149
  • 访问量
    4899173