Question

I'm having trouble making a query with the following output, Schema Name, Size and Creation Date. I'm new to Oracle and after more than 4 hours of searching I decided to create a question here.

I found the following query that returns name and size.

select owner, sum(bytes)/1024/1024 Size_MB from dba_segments
group by owner;
Was it helpful?

Solution

select u.username, 
       u.created, 
       round(nvl(sum(s.bytes)/1024/1024,0),2) size_mb
  from dba_users u
  left outer join dba_segments s on (s.owner = u.username)
 group by u.username, u.created
 order by u.username;
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top