Monday 10 March 2014

Find the size of database

How to find the size of database?

database size is nothing but sum of CRD files.

size of database = size of Control file + size of Redo log files + size of datafiles.

Queries to find sizes of CRD files:
select sum(bytes)/1024/1024/1024  from dba_data_files ;
select sum(bytes)/1024/1024/1024  from v$log ;
select sum((cffsz+1)*cfbsz)/1024/1024/1024  from x$kcccf  ;
now sum of above 3 results give size of database.
(or)
To find all in a single query use :
Select DF.TOTAL/1073741824 "DataFiles Size GB",
LOG.TOTAL/1073741824 "Redo LogSize GB",
CONTROL.TOTAL/1073741824 "Control Filesize GB" ,
(DF.TOTAL + LOG.TOTAl+ CONTROL.TOTAL)/1073741824 "Total DBSize GB" from dual,
(Select sum(a.bytes) TOTAL from dba_data_files a) DF,
(select sum(b.bytes) TOTAL from v$log b) LOG,
(Select sum((cffsz+1)*cfbsz) TOTAL from x$kcccf c) CONTROL;



cheers.......!!!!!!!

No comments:

ORA-600 [kwqitnmphe:ltbagi], [1], [0] reported in the alert log file.

ORA-00600 [kwqitnmphe:ltbagi] Cause: This issue arises in 12.1.0.2. The error occurs because there are still Historical Messages without...