spool dba_hist_undostat.txt
set linesize 260
column "Begin Time" format a22
column "End Time" format a22
column "Undo TS#" format 99999999
column "Undo Blks Used" format 99999999999999999
column "Xact Count" format 99999999999999999
column "Tuned Undo Rtn" format 99999999999999999
column "Max Query Len" format 99999999999999999
column "Max Concurrancy" format 99999999999999999
column "Unexp Steal Cnt" format 99999999999999999
column "Unexp Release Cnt" format 99999999999999999
column "Unexp Reuse Cnt" format 99999999999999999
column "Exp Steal Cnt" format 99999999999999999
column "Exp Release Cnt" format 99999999999999999
column "Exp Reuse Cnt" format 99999999999999999
column "ORA-1555" format 999999999
column "ORA-30036" format 999999999
SELECT TO_CHAR(v.begin_time, 'DD-Mon-YYYY HH24:MI:SS') "Begin Time",
TO_CHAR(v.end_time, 'DD-Mon-YYYY HH24:MI:SS') "End Time",
v.undotsn "Undo TS#",
v.undoblks "Undo Blks Used",
v.txncount "Xact Count",
v.tuned_undoretention "Tuned Undo Rtn",
v.maxquerylen "Max Query Len",
v.maxconcurrency "Max Concurrancy",
v.unxpstealcnt "Unexp Steal Cnt",
v.unxpblkrelcnt "Unexp Release Cnt",
v.unxpblkreucnt "Unexp Reuse Cnt",
v.expstealcnt "Exp Steal Cnt",
v.expblkrelcnt "Exp Release Cnt",
v.expblkreucnt "Exp Reuse Cnt",
v.ssolderrcnt "ORA-1555",
v.nospaceerrcnt "ORA-30036"
FROM dba_hist_undostat v
where v.begin_time>to_date('05-DEC-2007 06:00:00','DD-Mon-YYYY HH24:MI:SS');
spool off