1 查看当前的还原表空间信息
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
2 目前所有还原表空间
SQL> select tablespace_name,status,contents
2 from dba_tablespaces
3 where contents='UNDO';
TABLESPACE_NAME STATUS CONTENTS
------------------------------ --------- ---------
UNDOTBS1 ONLINE UNDO
JINLIAN_UNDO ONLINE UNDO
3 切换还原表空间
SQL> alter system set undo_tablespace=jinlian_undo;
系统已更改。
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string JINLIAN_UNDO
4 更改还原表空间的时间,改成1800秒
SQL> alter system set undo_retention=1800;
系统已更改。
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- -----------------------------
undo_management string AUTO
undo_retention integer 1800
undo_tablespace string JINLIAN_UNDO
5 删除还原表空间
SQL> drop tablespace jinlian_undo;
表空间已删除。
SQL> l
1 select tablespace_name,status,contents
2 from dba_tablespaces
3* where contents='UNDO'
SQL> /
TABLESPACE_NAME STATUS CONTENTS
------------------------------ --------- ---------
UNDOTBS1 ONLINE UNDO
在数据库中,当删除数据库中的还原表空间,该还原表空间所对应的数据文件也删除了,但在操作系统
上还存在该数据文件,需要手工删除。
6 视图v$undostat可以获取还原段数据信息,监控当前实例中undo空间以及事务如何运行。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12778571/viewspace-255289/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12778571/viewspace-255289/