How to find out Total Oracle Database size

How to find out Total Oracle Database size:-

An oracle database consists of data files, redo log files, control files & temporary files.
The size of the database actually means the total size of all these files.
The below query show the total size of an oracle database.

SQL>select
( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) +
( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from dba_temp_files ) +
( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) +
( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) "Size in GB"
from
dual


The logical size(Table, index, tablespace) of an oracle database
SQL> select round(sum(bytes)/1024/1024/1024,3) "ACTUAL DATABASE SIZE (GB)" from dba_segments;



Please share your ideas and opinions about this topic.

If you like this post, then please share with others.
Please subscribe on email for every updates on mail.

No comments:

Post a Comment