SQL> shutdown abort .com

About DBA Queries DBA Scripts Quick Guides Other Stuff Contact
Andy only 
 

Structure - Undo



Display the rollback segments
select	segment_name
,	status
from	dba_rollback_segs
/
Alter undo retention
alter system set undo_retention=500 scope=memory; 
Note. This is in seconds
What's in undo
select	tablespace_name
,	status
,	count(*) as HOW_MANY
from	dba_undo_extents
group	by tablespace_name
,	status
/
Is anything rolling back at the moment?
Look for the used_ublk value decreasing. If it is, the session connected with it is rolling back. When it reaches zero, rollback is complete.
set lines 100 pages 999
col username format a15
col command format a20
select	ses.username
,	substr(ses.program, 1, 19) command
,	tra.used_ublk
from	v$session ses
,	v$transaction tra
where	ses.saddr = tra.ses_addr
/
Copyright© 2007-2012 Andrew Barry