cancel
Showing results for 
Search instead for 
Did you mean: 

script for automatic delete of archive logs/redologs

Former Member
0 Kudos

Hi Experts,

Do you have any idea on how to create a shell script. Actually the function of it, is to automatically deletes the archive logs/redologs if reaches the limit. Or is there any parameter to change to set the automatic deletion of archive logs/redologs.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi,

at first, archivelogs should always be saved to tape before you delete them. If you don't want to backup them, may be for a test system, you can suppress them in ORACLE instead to delete them later.

You can run the database in "NOARCHIVE LOG MODE". If you do so, the online redologs are not archived, they are still reused and overwritten. You can not run an online Backup, when the database is in noarchive log mode. If you want to backup the database, you have to run an offline backup.

Do not use the NOARCHIVE LOG MODE for production or developemet systems.

To change the archive log mode:

shutdown the database

startup mount;

alter database noarchivelog;

alter database open;

archive log list will show the actual status

regards Ulrich

Former Member
0 Kudos

Hi Dwight

I assume DB is oracle.

In order to maintain archivelog file,

I recommend to use brarchive, which is installed together with SAP kernel.

brarchive can handle the backup for archive log file properly.

It sustains the information which log file is already backup and which is not so that always only saved archive log file can be deleted.

This is logically much safer way.

But if the oraarch directory is so small against the amount of 1-day archive log size, this doesn't help.

(I believe normally oraarch is large enough for contain more than 1-day archive log)