Oracle query get schema name, size and creation date
-
25-02-2021 - |
Pregunta
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;
Solución
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;
Licenciado bajo: CC-BY-SA con atribución
No afiliado a dba.stackexchange