Tuesday 17 November 2015

Delete Archive Logs in NOARCHIVELOG mode - Oracle Database

How to Delete Archive Logs when the space is getting consumed and you don't want to take the backup?

How to delete archive logs when the database is in NoArchivelog Mode? FRA is increasing, how to release space? How to delete Archive logs without taking backup?

While practicing Oracle Database Server, you might have thought about deleting archive logs without using them at all as they always keep on consuming your hard disk space.

Usually archive logs are very important when it comes to Oracle database, as they are main source of Oracle (RMAN) recovery scenarios. But this post is for normal learners who are practicing Oracle Database on their personal systems and are tired of increasing the Flash Recovery Area Size as soon as it fills up because of regular backups and archive logs.

So here it goes....

First of all, take a fresh full backup of your database using RMAN in case if anything goes wrong (although it's not going to happen, if you follow the steps correctly). This can be done like this ...



Now you know that you have a fresh backup of your Oracle database. So now you are ready to delete your archivelogs. The task is simple.

1. Shut Down your database.



2. Go to your Flash Recovery Area Location. In my case it is, "E:\app\Pammu\flash_recovery_area\"
Here you have to delete all the archivelogs manually i.e. simply delete everything what's inside "E:\app\Pammu\flash_recovery_area\orcl\ARCHIVELOG"

Note:- For Linux/Unix users, path may be different, but the process will remain same.

3. Again go to your RMAN prompt and connect to your database.

4. Startup your database in mount mode.



5. Crosscheck your archivelog. It will show validation failed for all archivelogs which simply means the archivelogs have expired.



6. Delete Expired Archive Log. While deleting, it will ask for a confirmation, enter 'Y' and proceed.



7. Open your database.



Now your previous archivelogs have been deleted and the archivelog mode will work normally as it was working before. I hope this article helps !!

No comments:

Post a Comment