統計某個時間段的歸檔日誌大小

zhangsharp20發表於2017-04-14
透過v$archived_log檢視

V$ARCHIVED_LOG displays archived log information from the control file, including archive log names. An archive log record is inserted after the online redo log is successfully archived or cleared (name column is NULL if the log was cleared). If the log is archived twice, there will be two archived log records with the same THREAD#, SEQUENCE#, and FIRST_CHANGE#, but with a different name. An archive log record is also inserted when an archive log is restored from a backup set or a copy and whenever a copy of a log is made with the RMAN COPY command.



sql如下:


select blocks*block_size/1024/1024, blocks,block_size from v$archived_log a where a.first_time >=to_date('2017/04/09 00:00:00','yyyy-mm-dd hh24:mi:ss')
and a.first_time<=to_date('2017/04/09 23:59:59','yyyy-mm-dd hh24:mi:ss');

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2137303/,如需轉載,請註明出處,否則將追究法律責任。

相關文章