select
f.file#,
round(f.bytes/1024/1024,2)||' Mb' megabytes,
decode(trunc(e.maxextend*blocksize/1000/10),
0,round(e.maxextend*blocksize,2)||' Mb',
null,null,
'Unlimited') maxextend,
decode(e.inc,null,null,round(e.inc*blocksize,2)||' Mb') inc,
ceil(nvl(r.min_resize,0)*blocksize)||' Mb' min_resize,
f.name
from sys.filext$ e, v$datafile f,
( select
e.file_id file#,
max(e.block_id + e.blocks) as min_resize
from dba_extents e
group by e.file_id
) r,
(select to_number(value)/1024/1024 blocksize
from v$parameter where name='db_block_size')
where e.file#(+) = f.file#
and r.file#(+) = f.file#
order by 1;