Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to housekeep archive log files?

Re: How to housekeep archive log files?

From: Howard J. Rogers <howardjr_at_www.com>
Date: Thu, 22 Mar 2001 19:54:23 +1100
Message-ID: <3ab9bdca$1@news.iprimus.com.au>

"PasirRis" <jackling_at_singnet.com.sg> wrote in message news:99advh$mnp$1_at_violet.singnet.com.sg...
> version: Oracle Std Ed 8.1.7 on Sun Solaris 8.
>
>
> 'archive log list' tells me some archive log seq nos. e.g. from 132 and
> current is 149.
> I do a hot backup of datafiles
> then, I issue the command 'alter system log switch'. (so, the current
 arch.
> log file will be 150 and files up to 149 is the targeted group for backup)
 I
> backup all the archive log files in the directory.
>
> I suppose after the datafiles, archive log files are backup (say to tape),
 I
> don't need to keep them in the disk and can remove those 'old' archive log
> files already.
>
> Question:
>
> (Any sample?) How to write a script to remove those archive log files
> already backuped? In the sample above, I suppose I should keep archive
 files
> from 150 onwards on the disk but anything b4 it can be removed from disk
> SAFELY (?).
>
> Any good idea?

Here's a good idea: buy more hard disks, and don't be too keen to get rid of prior archives. Yes, technically, you can safely remove any archives created before your lastest hot backup cycle started, but that presupposes that you will always be able to restore from the latest backup. What happens if you discover the latest backup is corrupt, or unuseable, or is inadvertently wiped by an eager Junior DBA? What happens if a User comes to you and says "I'm sorry, I dropped the most important table in the system!" "When did you do it?" "Three days ago, but I only just noticed"?

I tend to subscribe to the 'age out on disks and then onto tape' theory: Script a backup such that the current set of archives are copied into a DAY1 bucket. The ones that were in DAY1 get transferred to the DAY2 bucket. The ones previously in the DAY2 bucket get copied into the DAY3 bucket, and so on, until the ones previously in the DAY5 bucket get archived onto tape. You then have the usual grandfather-father type of tape rotation that ensures recoverability of old archives for up to, say, 6 months.

I actually used to do the same for the hot backups themselves, too.

The more you can keep on disk, the quicker recoveries will be. No nasty serial access devices to deal with (and to slow the recovery process down).

But as for archives: they are the only thing you have protecting you from data loss. I think they deserve a little cossetting as a result.

Regards
HJR
>
> thanks,
> jackling.
>
>
Received on Thu Mar 22 2001 - 02:54:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US