View the size of an Oracle database (partial or total in GB, MB, KB and B), run the SQL statements below:
Size of TABLESPACES in GB
select NAME_TABLESPACE tablespace_name, sum (bytes) / 1024/1024/1024 SIZE_GB from group by tablespace_name DBA_SEGMENTS;
Total size of the database in GB
select sum (bytes) / 1024/1024/1024 SIZE_GB from DBA_SEGMENTS;
TABLESPACES size in MB
select NAME_TABLESPACE tablespace_name, sum (bytes) / 1024/1024 SIZE_MB from group by tablespace_name DBA_SEGMENTS;
Total size of the database in MB
select sum (bytes) / 1024/1024 SIZE_MB from DBA_SEGMENTS;
TABLESPACES size in KB
select NAME_TABLESPACE tablespace_name, sum (bytes) / 1024 SIZE_KB from group by tablespace_name DBA_SEGMENTS;
Total size of the database in KB
select sum (bytes) / 1024 SIZE_KB from DBA_SEGMENTS;
Size of TABLESPACES B
select NAME_TABLESPACE tablespace_name, sum (bytes) from SIZE_B group by tablespace_name DBA_SEGMENTS;
Total size of the database in B
select sum (bytes) from SIZE_B DBA_SEGMENTS;