1.创建新的undo表空间
Create Undo Tablespace undotbs2
Datafile 'D:\ORACLE\ORADATA\ORCL\UNDOTBS02.DBF' Size 128M;
2.切换undo表空间
alter system set undo_tablespace=undotbs2 scope=both;
若原undo空间存在active的session,该命令也能执行成功,原undo空间中active的session一直会使用原undo空间直到执行完成,新的session会使用新的undo.
3.删除undo空间
4.查询某个DML占用多少undo空间
col sql_text format a40
set lines 130
select sq.sql_text sql_text, t.USED_UREC Records, t.USED_UBLK Blocks, (t.USED_UBLK*8192/1024) KBytes from v$transaction t,
v$session s,
v$sql sq
where t.addr = s.taddr
and s.sql_id = sq.sql_id(+)
and s.username = 'USER'
阅读(1394) | 评论(0) | 转发(0) |