Oct 28 2011

Delete Archivelog Using RMAN in Oracle

Category: Administration,Backup And RecoveryFatih Acar @ 09:40

If your storage is about full, you must either delete old backup and archivelog or move to tape. If you want to delete archivelog from FRA(ASM Storage-Flash Revovery Area) or filesystem for win space, you can use below commands. You can delete archivelog safely, because archivelog deleting does not harm to database.

Archivelog List Commands

RMAN>list archivelog all;
RMAN>list copy of archivelog until time ‘SYSDATE-10′;
RMAN>list copy of archivelog from time ‘SYSDATE-10′
RMAN>list copy of archivelog from time ‘SYSDATE-10′ until time ‘SYSDATE-2′;
RMAN>list copy of archivelog from sequence 1000;
RMAN>list copy of archivelog until sequence 1500;
RMAN>list copy of archivelog from sequence 1000 until sequence 1500;

Archivelog Delete Commands

RMAN>delete archivelog all;
RMAN>delete archivelog until time ‘SYSDATE-10′;
RMAN>delete archivelog from time ‘SYSDATE-10′
RMAN>delete archivelog from time ‘SYSDATE-10′ until time ‘SYSDATE-2′;
RMAN>delete archivelog from sequence 1000;
RMAN>delete archivelog until sequence 1500;
RMAN>delete archivelog from sequence 1000 until sequence 1500;

Note : Also, you can use noprompt statement for do not yes-no question.
RMAN>delete noprompt archivelog until time ‘SYSDATE-10′;

120,799 total views, 144 views today

Tags: Database Administration, Oracle

facebook comments:

4 Responses to “Delete Archivelog Using RMAN in Oracle”

  1. Pratik Mehta says:

    Thanks Fatih, useful commands…

  2. saravana says:

    fantastic commands. Thankyou verymuch

  3. saravana says:

    José Harvey is right. We should take backup of archivelogs and delete the archivelogs which are already backed up.

    example :
    ———-
    rman target /

    delete archivelog all completed before ‘sysdate -1′;

    or

    delete noprompt force archivelog all backed up 1 times to sbt_tape

    Regards
    Saravana

  4. Abhijit says:

    To the point and very much clear. Nice post.

Leave a Reply