1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| col Mo for 999990
col Go for 990.990
col "%age" for 90.00
col "%age TbS Occ" for 90.00
col "%age Occ Fic." for 90.00
col rang noprint
break on report
compute sum label cumul of nb on report
compute sum of "Mo" on report
compute sum of "Go" on report
select bytes /power(2,30) "Go", ddf.File_Name, ddf.File_Id, ddf.Tablespace_name, ddf.status, ddf.relative_FNO, ddf.online_status, 1 rang
from dba_data_files ddf
union
select bytes /power(2,30), dtf.File_Name, dtf.File_Id, dtf.Tablespace_name, dtf.status, dtf.relative_FNO, '-',2
from dba_temp_files dtf
order by rang,4,2;
select dtum.tablespace_name, trunc(dtum.Used_Percent*100)/100 "%age", ddf.Nb, ddf.Taille "Mo", ddf.Taille/power(2,10) "Go"
from dba_tablespace_usage_metrics dtum
inner join
(
select tablespace_name, count(file_name) Nb , round(sum(Bytes)/power(2,20),3) taille
from dba_data_files
group by tablespace_name
) ddf on ddf.tablespace_name = dtum.tablespace_name
order by 1
; |