Script : Size of Oracle database

DB Scripts

Answer: There are several ways to measure the size of an Oracle database:

1 – The size of the Oracle database files can be computed several ways:

— get database size from v$datafile:

select round((sum(bytes)/1048576/1024),2) from v$datafile;

— get Oracle database size from dba_data_files:
“Reserved_Space(MB)”, “Reserved_Space(MB)” – “Free_Space(MB)” “Used_Space(MB)”,”Free_Space(MB)”
(select sum(bytes/(1014*1024)) from dba_data_files) “Reserved_Space(MB)”,
(select sum(bytes/(1024*1024)) from dba_free_space) “Free_Space(MB)”
from dual

Leave a Reply

Your email address will not be published.