How to check the overall database size in oracle11g

we can find out the database size in two types
 1) Actual database  size
 2) Over all database  Size

1)Actual database size  Query

SELECT SUM (bytes) / 1024 / 1024 / 1024 AS GB FROM dba_data_files;


2)Over all Database size Query

Overall database size is the sum of used space plus free space i.e. the size of the data files, temp files, log files and the control files. You can find out the total database size using simple query. This sql gives the total size in GB.  
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;





Popular posts from this blog

Error in starting the service (OracleMTSRecovery)

ORA-39000, ORA-39143 ORA- 31619 invalid dump file in datapump

ORA-00439: feature not enabled: Flashback Database