/* ************************************************ */
/*                                                  */
/* fnctn:   SYSALLOC - System Space Allocated       */
/*                                                  */
/* name:    @c:\oracle\sql\sysalloc.sql             */
/* date:    12-MAY-95                               */
/* creator: Rick Kupcunas (Oracle)                  */
/*                                                  */
/* ************************************************ */

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

whenever sqlerror exit failure
spool sysalloc.lst
ttitle left 'SYSALLOC - System Space Allocated ' right CWS_DATE skip 2

 column owner            format A15
 column tablespace_name  format A15 heading Tablespace
 column bytes            format 999,999,999
 column blocks           format 999,999,999

 break   on  tablespace_name skip 2

select tablespace_name,
       owner,
       sum(bytes),
       sum(blocks)
  from sys.dba_extents
  where tablespace_name = 'SYSTEM'
  group by tablespace_name, 
       owner;

spool off
exit
