-- #############################################################################################
--
-- %Purpose: Show Size of each Object itself (without content) in the Database
--
--           Show size of each object in the database. Note
--           that NOT the size including the rows will be
--           shown for tables, but the size for the table itself.
--
-- #############################################################################################
--
set feed off;
set pagesize 10000;
set wrap off;
set linesize 200;
set heading on;
set tab on;
set scan on;
set verify off;
spool show_obyect_size.lst
ttitle off;

column owner format a8 heading 'Object|Owner'
column name format a30 heading 'Name'
column type format a13 heading 'Type'
column source_size format 99999999 heading 'Source|Size'
column parsed_size format 99999999 heading 'Parsed|Size'
column code_size format 99999999 heading 'Code|Size'
column error_size format 99999999 heading 'Error|Size'

SELECT owner, name, type, source_size, parsed_size, code_size, error_size
  FROM my_object_size
 WHERE owner NOT IN ('SYS','SYSTEM','PUBLIC')
 ORDER BY owner,type
/
spool off;
