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!

RMAN - delete obsolete command without confirmation

David_PasternakMar 12 2013 — edited Mar 12 2013
Hi everybody,

I've created a small script witch delete the obsolete and expired backups of RMAN.

The problem is: the "delete obsolete" and the "delete expired backup" command needs a confirmation with YES. Could I give the script the command in that way, that I don't need to confirm the command and he deletes the backups directly?

Here is my little script:
#!/bin/ksh

export ORACLE_SID=dbtest2
export ORACLE_HOME=/home/oracle/srv/ora/product/11.2.0/dbtest_2
export ORACLE_BIN=/home/oracle/srv/ora/product/11.2.0/dbtest_2/bin
alias RMAN=$ORACLE_BIN/rman

RMAN target / > report_del_obsolete 2>&1 <<EOI

    delete expired backup;
    delete obsolete;
    quit

EOI
Thanks for answers and ideas!

Regards,
David
This post has been answered by Paul M. on Mar 12 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2013
Added on Mar 12 2013
9 comments
2,072 views