Datafiles grouped by mount point

set pagesize 100
set linesize 120
col mountpoint format a25
col file_name format a50
break on Mountpoint skip 2 on report
compute sum of TRUE_GB on mountpoint
select
substr(file_name,1,instr(file_name,’/’,1,4)) Mountpoint,
file_name,
bytes/1024/1024 MB,
maxbytes/1024/1024 MAXMB,
round(decode(maxbytes,0,bytes,maxbytes)/1024/1024/1024,2) True_GB
from dba_data_files
union
select
substr(file_name,1,instr(file_name,’/’,1,4)) Mountpoint,
file_name,
bytes/1024/1024 MB,
maxbytes/1024/1024 MAXMB,
round(decode(maxbytes,0,bytes,maxbytes)/1024/1024/1024,2) True_GB
from dba_temp_files
order by file_name;

Leave a comment