This script should be run from SQL*plus prompt. This
can also be placed in a file and ran from the SQL*plus prompt.
SET
head off
SET pagesize 0
SELECT segment_name, Segment_type, sum(bytes)/(1024) KILOBYTES
FROM user_segments
GROUP BY segment_name, segment_type
ORDER BY segment_type, segment_name