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!

How to delete archivelogs ???????

443104Nov 17 2008 — edited Nov 18 2008
Dear Experts,

I am looking for a way to delete archive logs through RMAN's backup command, something like this:

BACKUP ARCHIVELOG all delete input until time 'sysdate-5/24';

We are on Oracle 10g Release 2 (10.2.0.3), IBM - AIX 5.3.

I would like to retain archivelog's generated in the last 5 hours on disk and let RMAN delete anything else older than that. When I am using the above command, RMAN is throwing errors on my face:

RMAN>  BACKUP ARCHIVELOG all delete input until time 'sysdate-5/24';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "until": expecting one of: "archivelog, backup, backupset, channel, copy, controlfilecopy, current, database, datafile, datafilecopy, delete, diskratio, db_recovery_file_dest, filesperset, format, from, force, include, keep, (, maxsetsize, noexclude, nokeep, not, pool, plus, reuse, recovery, ;, skip, spfile, setsize, tablespace, tag, to"
RMAN-01007: at line 1 column 36 file: standard input

RMAN>
I know RMAN has DELETE command but we are having issues when using BACKUP and DELETE. We are receiving intermittent errors during BACKUP command due to media manager and the backup fails. However, RMAN script continues and is happily removing archive logs from disk whether backed up or not.

I did try to look into manuals and google, but I think I am little dumb to extract information.

Your help is appreciated.

Regards

Edited by: Oracle Lover3 on Nov 16, 2008 11:45 PM

OS & DB version added
This post has been answered by ebrian on Nov 17 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2008
Added on Nov 17 2008
3 comments
2,260 views