一,windows
1,1 bat内容:
windows:
rman cmdfile=D:\scripts\delete_arch.txt >>D:\logs\del_arch_%date:~0,4%%date:~5,2%%date:~8,2%.log
linux:
05 00 * * * /home/oracle/scripts/rman_del_archive.sh >> /home/oracle/log/rman_del_archive_`date +\%Y\%m\%d_\%w`.log
1.2 delete_arch.txt内容:
connect target /
run{
crosscheck archivelog all;
delete noprompt archivelog all completed before 'sysdate-7';
}