/* ************************************************ */
/*                                                  */
/* format the report:                               */
/*        DBAEXTSYS - Table and Index Extents       */
/*                                                  */
/* name:    @c:\oracle\sql\dbaextsy.sql             */
/* date:    12-MAY-95                               */
/* creator: Rick Kupcunas (Oracle)                  */
/*                                                  */
/* ************************************************ */

set feedback  off
set WRAP      off
set pagesize  60
set linesize  75
set newpage   0
set trimout   on
set verify    on
set underline =
set echo      off
set termout   off

whenever sqlerror exit failure
spool $dbaextsys.lst

ttitle left 'PAGE:' sql.pno -
center 'DBAEXTSYS - Table and Index Extents ' -
right CWS_DATE skip 2
 column owner            format A10
 column segment_name     format A23
 column segment_type     format A5
 column tablespace_name  format A8 heading TBLSPACE
 column extent_id        format 99 heading EXT
 column bytes            format 999,999,999
 column blocks           format 999,999

 compute sum OF bytes  on tablespace_name
 compute sum OF blocks on tablespace_name

 break   on  tablespace_name skip 1

select tablespace_name,owner,segment_name,segment_type,extent_id,
       bytes,blocks
from sys.dba_extents
where tablespace_name = 'SYSTEM'
order by tablespace_name,owner,segment_name;

spool off
exit
