Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create batch file to delete logs in Windows

2778932Oct 21 2014 — edited Oct 23 2014

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?

This post has been answered by WadhahDaouehi on Oct 21 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 20 2014
Added on Oct 21 2014
11 comments
4,575 views