Tamaño de Base de Datos Oracle

Estos scripts retornan el tamaño de las Bases de Datos incluyendo data, temp, controlfile, redos.

#---Tamano-en-MB-#

SELECT  a.data_size_mb
       , b.temp_size_mb
       , c.redo_size_mb
       , d.controlfile_size_mb,
   a.data_size_mb
       + b.temp_size_mb
       + c.redo_size_mb
       + d.controlfile_size_mb "total_size in MB"
  FROM (SELECT SUM (BYTES) / 1024 / 1024 data_size_mb
       FROM dba_data_files) a,
       (SELECT NVL (SUM (BYTES), 0) / 1024 / 1024 temp_size_mb
          FROM dba_temp_files) b,
       (SELECT SUM (BYTES) / 1024 / 1024 redo_size_mb
          FROM SYS.v_$log) c,
       (SELECT SUM (block_size * file_size_blks)/1024/1024 controlfile_size_mb
          FROM v$controlfile) d;

DATA_SIZE_MB TEMP_SIZE_MB REDO_SIZE_MB CONTROLFILE_SIZE_MB total_size in MB
------------ ------------ ------------ ------------------- ----------------
      381448   20735.9922      1500             57.75     403741.742



#---Tamano-en-GB-#

SELECT  a.data_size_gb
       , b.temp_size_gb
       , c.redo_size_gb
       , d.controlfile_size_gb,
   a.data_size_gb
       + b.temp_size_gb
       + c.redo_size_gb
       + d.controlfile_size_gb "total_size in MB"
  FROM (SELECT SUM (BYTES) / 1024 / 1024 /1024 data_size_gb
       FROM dba_data_files) a,
       (SELECT NVL (SUM (BYTES), 0) / 1024 / 1024/1024 temp_size_gb
          FROM dba_temp_files) b,
       (SELECT SUM (BYTES) / 1024 / 1024/1024 redo_size_gb
          FROM SYS.v_$log) c,
       (SELECT SUM (block_size * file_size_blks)/1024/1024/1024 controlfile_size_gb
          FROM v$controlfile) d;


DATA_SIZE_GB TEMP_SIZE_GB REDO_SIZE_GB CONTROLFILE_SIZE_GB total_size in MB
------------ ------------ ------------ ------------------- ----------------
  372.507813   20.2499924   1.46484375        .056396484     394.279045