Re: sufficient next extent space

  • From: Tony.Adolph@xxxxxx
  • To: JBECKSTROM@xxxxxxxxx
  • Date: Mon, 7 Feb 2005 14:05:21 +0100

compute sum of total_MB on report
compute sum of used_MB on report
compute sum of free_MB on report
break on report
column ts format a15 heading "Tablespace|* = auto extend"
column TOTAL_MB format 9,999,999 heading "Size|Mbytes"
column pct_free format 999.99 heading "% Free"
column pct_used format 999.99 heading "% Used"
column used_MB format 9,999,999.9 heading "Used|Mbytes"
column free_MB format 9,999,999.9 heading "Free|Mbytes"
column max_extent_size format 99,999.99 heading 
"Largest|free|extent|Mbytes"

select
        df.tablespace_name||decode(autoextensible,'YES','*',' ') ts,
        total/1024/1024 Total_MB,
        (total - free)/1024/1024 Used_MB,
        ((total - free)/ total) * 100 pct_used,
        free/1024/1024 free_MB,
        (free / total ) * 100 pct_free,
        max_extent/1024/1024 max_extent_size
from
        (select
                tablespace_name,
                sum(bytes) free,
                max(bytes) max_extent
        from
                dba_free_space
        group
                by tablespace_name) fs
,
        (select
                tablespace_name,
                autoextensible,
                sum(bytes) total
        from
                dba_data_files
        group by tablespace_name, autoextensible
        union all
        select
                tablespace_name,
                autoextensible,
                sum(bytes) total
        from
                dba_temp_files
        group by tablespace_name,autoextensible) df
where
   df.tablespace_name = fs.tablespace_name (+)
/
clear compute
clear break
clear column


--
//www.freelists.org/webpage/oracle-l

Other related posts: