select nvl(b.tablespace_name,nvl(a.tablespace_name,'NA')) " Tablespace"
, kbytes_alloc/1024 "Allocated"
, (kbytes_alloc-nvl(kbytes_free,0))/1024 "used"
, nvl(kbytes_free,0) /1024 "free"
from (select sum(bytes)/1024 Kbytes_free
, max(bytes)/1024 largest
, tablespace_name
from dba_free_space
group by tablespace_name) a ,
(select sum(bytes)/1024 Kbytes_alloc
,tablespace_name
from dba_data_files
group by tablespace_name) b
where a.tablespace_name (+) = b.tablespace_name
and b.tablespace_name like '%'
order by 4 ;
No comments:
Post a Comment