Site icon IT Tutorial

Archivelog Delete Until time in Oracle Database

I will explain Delete Archivelog until time in Oracle Database in this post.

 

 

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 all archivelog without prompt ( yes or no question ) and with force option.

RMAN>  delete noprompt force archivelog all;

 

You can delete archivelog which is backed up 1 times to Tape. you can change 1 times with 2 or 3.

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

 

 

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

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

 

You can delete archivelog until spesific sequence option.

RMAN>   delete archivelog until sequence 9310 thread 1;






If you want to learn more details about Archivelog in Oracle database, read the following post.

Oracle Database Enable Archivelog Mode and Archivelog Deletion and Generation Frequency

 

 

 

 

Do you want to learn Oracle Database for Beginners, then Click and read the following articles.

Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

Exit mobile version