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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Frequency of Log Switches

RE: Frequency of Log Switches

From: Alex Hillman <alex_hillman_at_physia.com>
Date: Fri, 1 Dec 2000 10:20:07 -0500
Message-Id: <10697.123400@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C05BAA.2FEDD400
Content-Type: text/plain;

        charset="iso-8859-1"

Let say you ship your archivelogs to different machine and let say that your disks where you have your redo logs are annihilated (explosion, fire, etc.). You will lose all transaction activity in current redo log - doesn't matter how often you are doing checkpoints. So the only way to be sure that you will not loose more than 15 min. of data is to make log switch not later then 15 min. after previous switch to archive and ship to different destination.

Alex Hillman

-----Original Message-----
From: Michael Ray [mailto:Michael.Ray_at_trw.com] Sent: Friday, December 01, 2000 8:51 AM
To: Multiple recipients of list ORACLE-L Subject: RE: Frequency of Log Switches

It seems people are arguing over semantics, and the original poster was asking the wrong question. All he wanted was to not lose more than 15 minutes of data if he crashed. This is controlled by checkpoints, NOT log switches.

Setting the parameters Kieran mentioned appropriately will accomplish that (along with FAST_START_IO_TARGET if using 8i). The INTERVAL parameter specifies the maximum number of OS blocks you wish to be read in case of instance recovery. The TIMEOUT one specifies the maximum seconds of blocks you wish to read which obviously is much more ambiguous and why I believe Satar suggested staying away from it. If you are pre-8i these parameters have different meanings.

If you wish to force a log switch, ALTER SYSTEM SWITCH LOGFILE; but that is only going to increase IO on your system and gain you nothing.

Michael Ray
Oracle DBA
TRW, Marshall, IL
217-826-3011 x2438

>>> ASAURY_at_recherche.loreal.com 11/30/00 04:55AM >>>
I beg to differ : I am running 8.1.6 on NT with log_checkpoint_timeout = 300 and can have as much as 40 minutes between log switches.

I suppose that forcing a checkpoint does not forces a log switch (whereas the log switch forces the checkpoint).

Anybody having an idea on how to force a log switch ? Alain.

        -----Message d'origine-----

        Steven,

        try changing the initialization parameter LOG_CHECKPOINT_TIMEOUT to be 900

        and set the LOG_CHECKPOINT_INTERVAL to be a very high value (greater than

	the size of the redo logs),
	this will cause log switches every 15 minutes or when the log file
is full.
	Both of these values can 
	be dynamically altered using ALTER SYSTEM.

	Regards,
	Kieran Murray
	Norkom Technologies,
	43 Upper Mount Street, Dublin 2, Ireland
	Tel:- +353 86 8117916

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Michael Ray
  INET: Michael.Ray_at_trw.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: 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).

------_=_NextPart_001_01C05BAA.2FEDD400
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>RE: Frequency of Log Switches</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Let say you ship your archivelogs to different =
machine and let say that your disks where you have your redo logs are =
annihilated (explosion, fire, etc.).</FONT></P>

<P><FONT SIZE=3D2>You will lose all transaction activity in current =
redo log - doesn't matter how often you are doing checkpoints. So the =
only way to be sure that you will not loose more than 15 min. of data =
is to make log switch not later then 15 min. after previous switch to =
archive and ship to different destination.</FONT></P>

<P><FONT SIZE=3D2>Alex Hillman</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Michael Ray [<A =
HREF=3D"mailto:Michael.Ray_at_trw.com">mailto:Michael.Ray_at_trw.com</A>]</FON=
T>
<BR><FONT SIZE=3D2>Sent: Friday, December 01, 2000 8:51 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: RE: Frequency of Log Switches</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>It seems people are arguing over semantics, and the =
original poster was asking the wrong question. All he wanted was to not =
lose more than 15 minutes of data if he crashed. This is controlled by =
checkpoints, NOT log switches.</FONT></P>

<P><FONT SIZE=3D2>Setting the parameters Kieran mentioned appropriately =
will accomplish that (along with FAST_START_IO_TARGET if using 8i). The =
INTERVAL parameter specifies the maximum number of OS blocks you wish =
to be read in case of instance recovery. The TIMEOUT one specifies the =
maximum seconds of blocks you wish to read which obviously is much more =
ambiguous and why I believe Satar suggested staying away from it. If =
you are pre-8i these parameters have different meanings.</FONT></P>

<P><FONT SIZE=3D2>If you wish to force a log switch, ALTER SYSTEM =
SWITCH LOGFILE; but that is only going to increase IO on your system =
and gain you nothing.</FONT></P>

<P><FONT SIZE=3D2>Michael Ray</FONT>
<BR><FONT SIZE=3D2>Oracle DBA</FONT>
<BR><FONT SIZE=3D2>TRW, Marshall, IL</FONT>
<BR><FONT SIZE=3D2>217-826-3011 x2438</FONT>
</P>

<P><FONT SIZE=3D2>&gt;&gt;&gt; ASAURY_at_recherche.loreal.com 11/30/00 =
04:55AM &gt;&gt;&gt;</FONT>
<BR><FONT SIZE=3D2>I beg to differ : I am running 8.1.6 on NT with =
log_checkpoint_timeout =3D 300</FONT>
<BR><FONT SIZE=3D2>and can have as much as 40 minutes between log =
switches.</FONT>
</P>

<P><FONT SIZE=3D2>I suppose that forcing a checkpoint does not forces a =
log switch (whereas</FONT>
<BR><FONT SIZE=3D2>the log switch forces the checkpoint). </FONT>
</P>

<P><FONT SIZE=3D2>Anybody having an idea on how to force a log switch =
?</FONT>
<BR><FONT SIZE=3D2>Alain.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>-----Message d'origine-----</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>Steven,</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>try =
changing the initialization parameter LOG_CHECKPOINT_TIMEOUT to</FONT>
<BR><FONT SIZE=3D2>be 900</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>and set =
the LOG_CHECKPOINT_INTERVAL to be a very high value (greater</FONT>
<BR><FONT SIZE=3D2>than</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>the size =
of the redo logs),</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>this will =
cause log switches every 15 minutes or when the log file</FONT>
<BR><FONT SIZE=3D2>is full.</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Both of =
these values can </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>be =
dynamically altered using ALTER SYSTEM.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>Regards,</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Kieran =
Murray</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Norkom =
Technologies,</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>43 Upper =
Mount Street, Dublin 2, Ireland</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Tel:- =
+353 86 8117916</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Michael Ray</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: Michael.Ray_at_trw.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =
538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an =
E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of =
'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed =
Received on Fri Dec 01 2000 - 09:20:07 CST

Original text of this message

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