Tuesday, July 17, 2012

Size of schemas

Have you ever said to yourself: "Hey Mr. DBA, how big are the schemas in my database?"
I have, a lot. Especially in my test and development environments.

This very simple, and not super accurate, script shows you the size or your schemas in Megabytes ordered by biggest to smallest:
select  
      owner,
      (sum(bytes)/1024/1024) mb_size
from
      dba_segments
group by
      owner
order by
      2 desc;

No comments:

Post a Comment