Database size:-
select sum(bytes)/1024/1024 from dba_data_files;
Schema size:-
select owner,segment_name,segment_type, bytes
from dba_segments
order by owner,segment_type;
SELECT tablespace_name,owner,sum(bytes)/1024/1024 AS total_size_mb FROM dba_segments WHERE owner = 'schema_name';
select owner, segment_type, sum(bytes) "Bytes"
from dba_segments
group by owner, segment_type;
select segment_name,segment_type,bytes/1024/1024 MB from dba_segments
where segment_type='TABLE' and segment_name='';
Tablespace sizes :-
select tablespace_name, owner, SUM(BYTES)/1047685/1024 SIZE_GB
from dba_segments
group by rollup(owner,tablespace_name);
No comments:
Post a Comment