Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Archive Logs Growing to Fast
Hi Larry
You can try this to delete the archives from a cron job. Execute the following script from cron and run it at least once a day.
####Script to delete old archives
####Larry Taylor
DIR=/enter your directory for archive logs here find $DIR -name "*.arc" -mtime +3 -exec rm "{}" ";"
HTH Best Regards
Suhen Pather
Oracle DBA
Strandbags (Australia)
02 9479 7791
email suhen.pather_at_strandbags.com.au
-----Original Message-----
From: Suhen Pather [mailto:Suhen.Pather_at_strandbags.com.au]
Sent: Wednesday, 22 November 2000 14:45
To: Multiple recipients of list ORACLE-L
Subject: RE: Archive Logs Growing to Fast
Hi Larry
Are you doing physical backups on your database??? If not then the archives may be of no use. You can switch off archiving.
If you are doing hot/cold backups and need the archives then you need to backup the logs before deleting them. The reason for so many archives is either the system is very busy (lots of write activity) or the online redo logs are too small. Try to resize the redo logs larger.
Write a cron job to remove the old archives (older than 3 days).
I do not have a script with me though.
I have written a script like this and it is quite simple to write.
Do a man on find and there are examples of how to write the ksh script
to remove the old files.
HTH Best Regards
Suhen Pather
Oracle DBA
Strandbags (Australia)
02 9479 7791
email suhen.pather_at_strandbags.com.au
-----Original Message-----
Sent: Wednesday, 22 November 2000 12:18
To: Multiple recipients of list ORACLE-L
Hi All,
I need a script that will delete (rm) a file(s) if the file(s) is 3 days
old.
My archive logs are filling up my disk at a rapid pace.
Does anyone have any suggestions?
This is what the files look like:
-rw-r----- 1 oracle dba 209715712 Nov 19 19:27 0000097621.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 19:38 0000097622.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 19:48 0000097623.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 19:59 0000097624.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 20:10 0000097625.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 20:20 0000097626.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 20:31 0000097627.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 20:42 0000097628.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 20:53 0000097629.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 21:04 0000097630.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 21:15 0000097631.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 21:26 0000097632.arc
-rw-r----- 1 oracle dba 209715712 Nov 19 21:38 0000097633.arc
Thanks in advance
larry
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Larry Taylor
INET: ltaylor_at_iq.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may Received on Tue Nov 21 2000 - 22:26:58 CST
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message