#查看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.
(这些归档日志文件的信息来自控制文件)
查询涉及的列名:
block_size NUMBER Redo log block size. This is the logical block size of the archived log, which is the same as the logical block size of the online log from which the archived log was opied. The online log logical block size is a platform. specific value that is not adjustable by the user.
block NUMBER Size of the archived log (in blocks)
fisrt_time DATE Timestamp of the first change
查看昨天日志文件产生的量(MB)
SELECT SUM(block_size*blocks)/1024/1024/1024 "SIZE(MB)"
FROM v$archived_log
WHERE TRUNC(first_time) >= TRUNC(sysdate-1)
AND TRUNC(first_time) < TRUNC(sysdate);
查看以前每天产生的日志文件(MB)
SELECT TRUNC(first_time) "TIME",SUM(block_size*blocks)/1024/1024/1024 "SIZE(MB)"
FROM v$archived_log
GROUP BY TRUNC(first_time);