set echo off pages 999 lines 100
col "Initial(K)" for 999,999
col "Next(K)" for 999,999
col "Total(MB)" for 999,999
col "Free(MB)" for 999,999
col dd.file_id noprint
select dt.TABLESPACE_NAME, INITIAL_EXTENT/1024 "Initial(K)",
       NEXT_EXTENT/1024 "Next(K)", sum(dd.BYTES)/(1024*1024) "Total(MB)", 
       dt.STATUS, EXTENT_MANAGEMENT "Management" ,ALLOCATION_TYPE "AllocType"
from dba_tablespaces dt, dba_data_files dd
where dt.TABLESPACE_NAME=dd.TABLESPACE_NAME
group by dt.TABLESPACE_NAME, INITIAL_EXTENT,
         NEXT_EXTENT, dt.STATUS, EXTENT_MANAGEMENT, ALLOCATION_TYPE
union
select dt.TABLESPACE_NAME, INITIAL_EXTENT/1024 "Initial(K)",
       NEXT_EXTENT/1024 "Next(K)",  sum(dp.BYTES)/(1024*1024) "Total(MB)", 
       dt.STATUS, EXTENT_MANAGEMENT "Management" ,ALLOCATION_TYPE "AllocType"
from dba_tablespaces dt, dba_temp_files dp
where dt.TABLESPACE_NAME=dp.TABLESPACE_NAME
group by dt.TABLESPACE_NAME, INITIAL_EXTENT,
         NEXT_EXTENT, dt.STATUS, EXTENT_MANAGEMENT, ALLOCATION_TYPE
order by TABLESPACE_NAME;

set echo on lines 80

