Lin Hong's TECH Blog! 刀不磨要生锈,人不学习要落后 - Thinking ahead

Oracle UNDO tablespace size Tips

2023-02-15

Oracle UNDO tablespace size Tips

scripts

Scripts

SELECT a.tablespace_name,
       SIZEMB,
       USAGEMB,
       (SIZEMB - USAGEMB) FREEMB, (sizemb-(sizemb-usagemb))/sizemb*100 PERCENT_USED
  FROM (  SELECT SUM (bytes) / 1024 / 1024 SIZEMB, b.tablespace_name
            FROM dba_data_files a, dba_tablespaces b
           WHERE a.tablespace_name = b.tablespace_name AND b.contents = 'UNDO'
        GROUP BY b.tablespace_name) a,
       (  SELECT c.tablespace_name, SUM (bytes) / 1024 / 1024 USAGEMB
            FROM DBA_UNDO_EXTENTS c
           WHERE status <> 'EXPIRED'
        GROUP BY c.tablespace_name) b   
 WHERE a.tablespace_name = b.tablespace_name; 

Oracle_undo_size

Reference

Have a good work&life! 2023/02 via LinHong


Similar Posts

Comments