undo表空间管理


(1)建立新的undo表空间(处于active状态的undo tablespace 不能offline 和 drop),可以建立多个undo表空间,但一个时刻只有一个处于active。
 SQL> create undo tablespace
   2  undotbs datafile '/u01/app/oracle/oradata/anny/undotbs01.dbf' size 100m
   3  autoextend on next 10m maxsize 500m;
 
 Tablespace created.
 
 SQL> select tablespace_name,status,contents from dba_tablespaces;
 
 TABLESPACE STATUS                      CONTENTS
 ---------- --------------------------- ---------------------------
 SYSTEM     ONLINE                      PERMANENT
 RTBS       ONLINE                      UNDO
 SYSAUX     ONLINE                      PERMANENT
 TEMP       ONLINE                      TEMPORARY
 USERS      ONLINE                      PERMANENT
 TEXT       ONLINE                      PERMANENT
 LX01       ONLINE                      PERMANENT
 UNDOTBS    ONLINE                      UNDO
 
 8 rows selected.
    (2)查看当前正在使用的undo tablespace
      
 SQL> show parameter undo
 
 NAME                                 TYPE                              VALUE
 ------------------------------------ --------------------------------- ------------------------------
 undo_management                      string                            AUTO
 undo_retention                       integer                           900
 undo_tablespace                      string                            rtbs
    
   (3)切换undo
 
 SQL> alter system set undo_tablespace=undotbs;
 
 System altered.
 
 SQL> show parameter undo
 
 NAME                                 TYPE                              VALUE
 ------------------------------------ --------------------------------- ------------------------------
 undo_management                      string                            AUTO
 undo_retention                       integer                           900
 undo_tablespace                      string                            UNDOTBS
 
   (4)删除undo tablespace
   
 SQL> drop tablespace rtbs including contents and datafiles;
 
 Tablespace dropped.

你可能感兴趣的:(空间,Active,表,contents,created)