DATAFILE_BLOCKS The number of data blocks in the datafile
BLOCKS The number of data blocks written to the backup
BLOCK_SIZE The size of the data blocks in bytes
So BLOCKS * BLOCK_SIZE will give the number of bytes written for this
particular datafile and hence the size of the backup piece may be calculated.
SQL> select bs_key, sum(blocks*block_size)
from rc_backup_datafile
group by bs_key;
If you do not use catalog (controlfile):
SQL>select bs_key, sum(blocks*block_size)
from v$backup_datafile
group by bs_key;
-- Tamanho Undo Atual SELECT SUM(a.bytes) "UNDO_SIZE" FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' AND c.status = 'ONLINE' AND b.name = c.tablespace_name AND a.ts# = b.ts#; -- Blocos de UNDO por Seg. SELECT MAX(undoblks/((end_time-begin_time)*3600*24)) "UNDO_BLOCK_PER_SEC" FROM v$undostat; --Tamanho do Bloco SELECT TO_NUMBER(value) "DB_BLOCK_SIZE [KByte]" FROM v$parameter WHERE name = 'db_block_size'; -- Select calcula UNDO RETENTION SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]", SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]", ROUND((d.undo_size / (to_number(f.value) * g.undo_block_per_sec))) "OPTIMAL UNDO RETENTION [Sec]" FROM ( SELECT SUM(a.bytes) undo_size FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' ...
Comentários
Postar um comentário