Wednesday, October 22, 2008

Schema Space Consumption

Set Pagesize 100
Column GB Format 99.99
Column Owner Format A30
Break on Report
Compute Sum of GB on Report

Select RPad(Owner,30,' .')
As
Owner,
-------------------------------------------------------
Round ( Sum(Sum_Bytes) / 1024 / 1024 / 1024, 2 )
As
Gb
From
--+----------------------------------------------------
(
Select Owner,
--------------------
Sum(Bytes)
As
Sum_Bytes
--------------------
From Dba_Segments ds
Where Exists (
Select Username
From Dba_Users du
Where du.Username = ds.Owner
)
Group By Owner
, Segment_Name
, Segment_Type
)
--+----------------------------------------------------
Group By Owner
Order By GB Desc;

No comments:

Post a Comment