千家信息网

[Oracle Script] Undo Usage Per status

发表于:2025-01-22 作者:千家信息网编辑
千家信息网最后更新 2025年01月22日,select tablespace_name,sum(decode(status,'EXPIRED',bytes,0)) "EXPIRED", round(sum(decode(status,'EXP
千家信息网最后更新 2025年01月22日[Oracle Script] Undo Usage Per status
select tablespace_name,sum(decode(status,'EXPIRED',bytes,0)) "EXPIRED", round(sum(decode(status,'EXPIRED',bytes,0))/sum(bytes),4)*100 "Reused Ratio",
sum(decode(status,'UNEXPIRED',bytes,0)) "UNEXPIRED", sum(decode(status,'ACTIVE',bytes,0)) "ACTIVE",
round((sum(decode(status,'UNEXPIRED',bytes,0))+sum(decode(status,'ACTIVE',bytes,0)))/sum(bytes),4)*100 "Used Ratio"
from dba_undo_extents group by tablespace_name
order by 1;

0