管理Undo数据

SQL> select sum(bytes),status from dba_undo_extents group by status;

SUM(BYTES) STATUS
---------- ---------
   2621440 UNEXPIRED
  32702464 ACTIVE
1384775680 EXPIRED




SQL> select begin_time, END_TIME , MAXQUERYLEN,MAXCONCURRENCY,UNEXPIREDBLKS ,EXPIREDBLKS from v$undostat;

BEGIN_TIM END_TIME  MAXQUERYLEN MAXCONCURRENCY UNEXPIREDBLKS EXPIREDBLKS
--------- --------- ----------- -------------- ------------- -----------
26-FEB-01 26-FEB-01     124       3  3976   169216
26-FEB-01 26-FEB-01     725       0     0   170992
26-FEB-01 26-FEB-01     123       0     0   170992
26-FEB-01 26-FEB-01     725       0     0   170992
26-FEB-01 26-FEB-01    1326       0     0   170992


查看回滚段的使用情况,哪个用户正在使用回滚段的资源,如果有用户最好更换时间(特别是生产环境:

SQL> set linesize 200
SQL> select s.sid, s.username, u.name, t.USED_UBLK
  from v$transaction t, v$rollstat r, v$rollname u, v$session s
 where s.taddr = t.addr
   and t.xidusn = r.usn
   and r.usn = u.usn
 order by s.username;  2    3    4    5    6  

       SID USERNAME			  NAME				  USED_UBLK
---------- ------------------------------ ------------------------------ ----------
	34 SCOTT			  _SYSSMU8_3901294357$		       4464


USED_UBLK	NUMBER	Number of undo blocks used


NAME	VARCHAR2(30)	Rollback segment name

你可能感兴趣的:(undo)