Ask the Expert

Can I use SQL*Plus to remove archived redo logs?

I shut down my DB Oracle 10g each night and by means of cp command in RHEL, I copy files in Oradata to another server. Then I start up DB again. I hope I would be able to recover DB to that night time if disk crash occurs the next day as offline backup. Above it, I archive redologs by means of archivemode in flash recovery area in order to recover DB as most as possible. Obviously I do not need archivelogs older then 1 day, but I am not able to delete them! When flash recovery area size is full (2GB), the DB stops! The deleting of archivelogs by RM command does not help, because DB does not know this fact and DB assumes the limit is full. RMAN does not work in that installation (Btw, RMAN is too monstrous instrument for this simple task). Could you give me advice on how to delete archive logs without RMAN, and only with SQLPlus?

    Requires Free Membership to View

There is no SQL*Plus command to remove your archived redo logs. The best you can hope for in SQL*Plus is to use the host command to execute the operating system "rm" command, but it sounds like you do not want to do that.

One thing that I have used in the past is to a Perl script I wrote to delete files from a directory that are older than a specified period of time. Since you know how often your backup is taken, you an use this script to delete yesterday's archived redo logs, for example. You can find my "delete_old.zip" script on my web site (www.peasland.net) in the Scripts section.

This was first published in January 2008

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: