Find the space used by Tablespaces:
set pages 10000 line 200col tablespace_name format a20col file_name format a50col file_mb format 999999col data_mb format 999999col free_mb format 999999col max_mb format 999999select distinct files.tablespace_name, sum(ceil(files.mb)) file_mb, sum(ceil(files.mb - nvl(free.freemb,0))) data_mb,sum(nvl(free.freemb,0)) free_mb, sum(files.maxmb) max_mb, round(sum(files.maxmb)-sum(ceil(files.mb - nvl(free.freemb,0)))) gth_cap,round(sum(ceil(files.mb - nvl(free.freemb,0)))/sum(files.maxmb)*100) PCT_USEDfrom(select file_id, file_name, tablespace_name, bytes/1024/1024 mb, autoextensible,decode(autoextensible,'NO',bytes/1024/1024,decode(sign(maxbytes-bytes),-1,bytes/1024/1024,maxbytes/1024/1024)) maxmbfrom dba_data_files) files,(select file_id, sum(bytes)/1024/1024 freembfrom dba_free_spacegroup by file_id) freewhere files.file_id = free.file_id (+)group by files.tablespace_nameorder by 1,2;
No comments:
Post a Comment