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: benefits of multiple switch logfile calls?

Re: benefits of multiple switch logfile calls?

From: Burt Peltier <burttemp1ReMoVeThIs_at_bellsouth.net>
Date: Wed, 3 Dec 2003 23:48:58 -0600
Message-ID: <3Tzzb.2890$L47.846@bignews3.bellsouth.net>


Doing even 1 "switch logfile" makes no sense, especially when you consider that the command comes back instantly but the LGWR process might not finish for a minute or 2 (depending on how fast LGWR copies the REDO).

This would be a problem when the next thing your backup is doing is probably (or should be) copying the archived redo logs . So, the copy of the archived redo log being created by LGWR might be changing by LGWR while you are copying.

I wonder if the problem with your test recover is that you do not do an "alter system checkpoint;" to dump the buffered REDO uncommitted log information before doing the archive log current?

The old backup would have maybe not had a similar problem because the "switch logfile" causes a checkpoint (I think) and so as long as the copy of the archived redo log was done after LGWR was finished , you would have been ok.

-- 
"Don Seiler" <don_at_seiler.us> wrote in message
news:pan.2003.12.03.19.10.01.379872_at_seiler.us...

> Testing hot backup strategy for Oracle 9.2.0.4. Due to space concerns I'm
> not using RMAN right now, just putting tablespaces in backup mode and
> gzipping datafiles to backup dir, similar to what we do now in Oracle
> 7.3.4.5.
>
> One problem I have is that my test recover failed complaining that it
> needed to apply more archive logs. The logfile it asks for was not
> created. In my new backup script I call "ALTER DATABASE ARCHIVE LOG
> CURRENT" before copying over the log files.
>
> However in the Oracle 7.3.4.5 (written by wiser consultant 5 years before
> my time) script, there are three "switch logfile" statements in succession
> followed by the archive log current, literally like this:
>
> ALTER SYSTEM SWITCH LOGFILE;
> ALTER SYSTEM SWITCH LOGFILE;
> ALTER SYSTEM SWITCH LOGFILE;
> ALTER SYSTEM ARCHIVE LOG CURRENT;
>
> Would that fact that I'm not calling SWITCH LOGFILE at all (let alone
> multiple times) lead to the fact that I'm missing some redo info? I don't
> understand why multiple calls are of any value, but I've seen it done in
> other scripts on the web and in the Oracle news groups.
Received on Wed Dec 03 2003 - 23:48:58 CST

Original text of this message

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