windows下oracle定时删除归档日志

D:\delete_archivelog.txt cmdfile内容:
connect target  /
run{
    crosscheck archivelog all;
    DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';
    delete expired archivelog all;
}


del_archivelog.bat脚本:
@echo off
set "filename=del_archivelog_%date:~0,4%%date:~5,2%%date:~8,2%.txt"
(
echo.
echo =========================  正在清除过期归档文件,请稍等...... %date% %time%  =========================
echo.
rman cmdfile=D:\delete_archivelog.txt
echo.
echo =========================              【结束清理 %date% %time%】                  =========================
echo.
)>>D:\%filename% 2>&1<nul
pause

  

上一篇:20210202Oracle11g归档日志不能删除问题


下一篇:Oracle数据库体系结构之内存结构(4)