Thursday, 4 August 2022

 

Delete Archivelog until time

Oracle database is archiving redo log group files if database is in archivelog mode.

 

When redo log files are archived, then redo log files are overwritten with new redo data. But archivelogs are not deleted or automatically if you don’t schedule any deletion job.

You need to delete archivelog periodically, otherwise you will get archiver errors.


Delete Archivelog via RMAN

You can delete all archivelogs with following query.

RMAN>  delete archivelog all;

Delete Archivelog Until Time Oracle

You can delete archivelogs until spesific time ( until time 1 day ago ) like following query.

RMAN>  delete archivelog until time 'sysdate -1';

You can delete archivelog which is backed up 1 times to Disk.

RMAN>   delete archivelog all backed up 1 times to DISK;