We are running Oracle 11G on Windows 2008 R2. To free spaces, we run rman commands everyday manually. I would like to create a batch to do it automatically. This is the batch file I created.
Echo Yes |Del Y:\Orace11g\temp\*.*
Robocopy D:\Relius\Admin\RADB\ArchiveLogFiles\ Y:\Orace11G\temp\ /move /minage:3
rman
connect target sys@radb;
password
crosscheck archivelog all;
delete expired archivelog all;
Yes
but it stops at rman
C:\>rman
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Oct 21 10:49:27 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN>
What's the correct way to cerate the batch file to delete the expired archivelogs?