rman target/@orcl
crosscheck archivelog all;
delete expired archivelog all;
交互提示
delete archivelog all completed before 'sysdate-7';
不交互直接删除
DELETE noprompt ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-11';
监控归档日志生成量
SELECT TRUNC(FIRST_TIME) "日期",
TRUNC(SUM(BLOCKS * BLOCK_SIZE) / 1024 / 1024 / 1024, 2) "大小(GB/DAY)"
FROM V$ARCHIVED_LOG
GROUP BY TRUNC(FIRST_TIME)
ORDER BY 1 DESC;