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