Find the Overall DB Size in oracle Database
The biggest portion of a database's size comes from the datafiles. To find out how many megabytes are allocated to all datafiles the query is given below. My Database is new and i have few tables in it that's way the size is too small:
select sum(bytes)/1024/1024 "Megabiytes" from dba_data_files;
To get the size of all TEMP files:
select nvl(sum(bytes),0)/1024/1024 "Megabiytes" from dba_temp_files;
To get the size of the on-line redo-logs:
select sum(bytes)/1024/1024 "Megabiytes" from sys.v_$log;
Putting it all together into a single query:
select a.data_size+b.temp_size+c.redo_size "total_size"
from ( select sum(bytes) data_size
from dba_data_files ) a,
( select nvl(sum(bytes),0) temp_size
from dba_temp_files ) b,
( select sum(bytes) redo_size
from sys.v_$log ) c
/
Comments
Post a Comment