SQL command to find size of Oracle database

The size of the database is the total size of the datafiles that make up the tablespaces of the database. These details are found in the dba_extents view. type the following lines at the SQL*PLUS prompt:

######## datafiles size ##########
SQL> select sum(bytes/1024/1024/1024) from dba_data_files;

######## actual database size #########

SQL> select sum(bytes/1024/1024/1024) from dba_segments;

The size returned is in GB

3 thoughts on “SQL command to find size of Oracle database

Leave a Reply