Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1795304
  • 博文数量: 334
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 3452
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-18 10:19
个人简介

路虽弥,不行不至;事虽少,不做不成。

文章分类

全部博文(334)

文章存档

2013年(4)

2012年(19)

2011年(27)

2010年(71)

2009年(45)

2008年(15)

2007年(84)

2006年(69)

分类: Oracle

2007-05-11 14:03:20

Undo segments purpose
 
  .Transaction rollback
  .Transaction recovery
  .Read consistency
 
Automatic undo management
  .parameters
    --undo_management [auto]        <---initialization parameter
    --undo_tablespace [undotbs]
    --undo_retention  [10800]
    --undo_suppress_error [false]
 
 
Creating undo tablespace[假设原来undo为undotbs1,现新建为undotbs2]
 
  create undo tablespace tablespace_name  [datafile_clause] [extent_clause]
   

1.新建undo tablespace
create undo tablespace undotbs2 datafile 'd:\oracle9i\oradata\undotbs2.dbf' size 5m extent management local; 

2.设置参数
alter system set undo_tablespace=undotbs2;

3.查看原来undotbs1中是否还有事务
select a.name,b.*
from v$rollname a,v$rollstat b
where a.usn=b.usn
  and a.name in (select segment_name
                 from dba_rollback_segs
                 where tablespace_name='UNDOTBS2')

如果查询没有返回行,则可以删除undotbs1表空间

4.删除undo表空间
drop tablespace untotbs1 including contents and datafiles;

 
Resizing undo datafiles
 

alter database datafile 'D:\oracle9i\oradata\rhce\undo02.dbf' resize 4m;

alter database datafile 'D:\oracle9i\oradata\rhce\undo02.dbf' autoextend on next 512k maxsize 3m;

alter tablespace undo02
add datafile 'D:\oracle9i\oradata\rhce\undo22.dbf' size 1m

 
阅读(1360) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~