DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Saturday, October 3, 2015

How to check the undo status with active, expired, unexpired details

col value for a15
select
  A.value, B.TOTALMB , C_ACTIVE.ACTIVEMB, C_EXPIRED.EXPIREDMB, C_UNEXPIRED.UNEXPIREDMB,
     (B.TOTALMB - C_ACTIVE.ACTIVEMB - C_UNEXPIRED.UNEXPIREDMB) AvailableBeforeGetting1055
from v$parameter A,
    (select tablespace_name, trunc(sum(bytes)/1024/1024) TOTALMB from dba_data_files group by tablespace_name) B,
     (select tablespace_name, trunc(sum(bytes)/1024/1024) ACTIVEMB from dba_undo_extents where STATUS='ACTIVE' group by tablespace_name) C_ACTIVE,
     (select tablespace_name, trunc(sum(bytes)/1024/1024) EXPIREDMB from dba_undo_extents where STATUS='EXPIRED' group by tablespace_name) C_EXPIRED,
     (select tablespace_name, trunc(sum(bytes)/1024/1024) UNEXPIREDMB from dba_undo_extents where STATUS='UNEXPIRED' group by tablespace_name) C_UNEXPIRED
where A.name = 'undo_tablespace'
  and B.tablespace_name = A.value
  and C_ACTIVE.tablespace_name = A.value
  and C_EXPIRED.tablespace_name = A.value
  and C_UNEXPIRED.tablespace_name = A.value;

1 comment:

Sridevi K said...


Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.