purge undo tablespace oracle 11g

Solutions on MaxInterview for purge undo tablespace oracle 11g by the best coders in the world

showing results for - "purge undo tablespace oracle 11g"
Serena
31 Jun 2016
1-- UNDO tablespace current usage / available space
2SELECT a.TABLESPACE_NAME, SIZEMB, USAGEMB, (SIZEMB - USAGEMB) AS FREEMB
3FROM (SELECT round(sum(BYTES) / 1e6) AS SIZEMB, b.TABLESPACE_NAME
4      FROM DBA_DATA_FILES a, DBA_TABLESPACES b
5      WHERE a.TABLESPACE_NAME = b.TABLESPACE_NAME AND b.CONTENTS LIKE 'UNDO'
6      GROUP BY b.TABLESPACE_NAME) a,
7     (SELECT c.TABLESPACE_NAME, sum(BYTES) / 1e6 AS USAGEMB
8      FROM DBA_UNDO_EXTENTS c
9      WHERE STATUS <> 'EXPIRED'
10      GROUP BY c.TABLESPACE_NAME) b
11WHERE a.TABLESPACE_NAME = b.TABLESPACE_NAME;