set lines 300 pages 3000 col file_name for a65 col TABLESPACE_NAME for a30 SELECT A.TABLESPACE_NAME,round(SUM(A.SUM_TOT)/1024/1024) "Total size MB", round(SUM(A.SUM_BYTES)/1024/1024) "Total Free MB", (SUM(A.SUM_BYTES)*100/SUM(A.SUM_TOT)) "%FREE", 100-(SUM(A.SUM_BYTES)*100/SUM(A.SUM_TOT)) "%USED", round(SUM(A.LARGEST)/1024/1024) MAX_FREE,SUM(A.CHUNKS) CHUNKS_FREE FROM ( SELECT TABLESPACE_NAME,0 SUM_TOT,SUM(BYTES) SUM_BYTES, MAX(BYTES) LARGEST,COUNT(*) CHUNKS FROM SYS.DBA_FREE_SPACE A GROUP BY TABLESPACE_NAME UNION SELECT TABLESPACE_NAME,SUM(BYTES) SUM_TOT,0,0,0 FROM SYS.DBA_DATA_FILES GROUP BY TABLESPACE_NAME) A, V$INSTANCE B GROUP BY UPPER(B.INSTANCE_NAME),A.TABLESPACE_NAME having (100-(SUM(A.SUM_BYTES)*100/SUM(A.SUM_TOT))) > 5 / |
Thank you for your comment !