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: Does a commit cause a checkpoint?

Re: Does a commit cause a checkpoint?

From: Ryan <rgaffuri_at_cox.net>
Date: Wed, 18 Jun 2003 23:10:17 -0400
Message-ID: <mS9Ia.14351$8p2.6087@lakeread04>

"Peter" <peter_at_nomorenewsspammin.ca> wrote in message news:4b62fv4tp8p9ftk5ste75837olk0g3kr7g_at_4ax.com...
> On Thu, 19 Jun 2003 00:41:45 GMT, Hans Forbrich
> <forbrich_at_telusplanet.net> wrote:
>
> A logswitch causes a checkpoint which causes LGWR to flush the redo
> log buffer, but no change in SCN
>
> A checkpoint causes the DBWn to write to file, and also causes the
> LGWR to flush the redo buffer, but no change in SCN
>
> >
> >
> >Peter wrote:
> >
> >> Does a commit cause a checkpoint?
> >>
> >> A checkpoint causes the SCN to increment. A logswitch causes a
> >> checkpoint and threrefore a SCN incremental change.
> >> What I am confused about is whether a commit causes a checkpoint and
> >> therefoe a SCN increment.
> >>
> >
> >From the "Oracle9i Database Administrator's Guide, Release 2 (9.2), Part
> >Number A96521-01" at
>
>http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/onliner
edo.htm#ADMIN007
> >in Chapter 7, "Managing the Online Redo Log", in section titled "Online
> >Redo Log Contents",
> >
> >the second paragraph reads:
> >
> >>>>>>>>
> >Redo records are buffered in a circular fashion in the redo log buffer
> >of the SGA (see "How Oracle Writes to the Online Redo Log") and are
> >written to one of the online redo log files by the Oracle background
> >process Log Writer (LGWR). Whenever a transaction is committed, LGWR
> >writes the transaction's redo records from the redo log buffer of the
> >SGA to an online redo log file, and a system change number (SCN) is
> >assigned to identify the redo records for each committed transaction.
> >Only when all redo records associated with a given transaction are
> >safely on disk in the online logs is the user process notified that the
> >transaction has been committed.
> ><<<<<<<
> >
> >Please note the sentance starting with "Whenever a transaction is
> >committed,"
> >
> >(I'm still wondering what is your documentation source - whatever it is
> >seems to be leaving huge gaps in your understanding)
> >
> >/Hans
> >
> >>
> >> Thanks
>

what happens if there is a checkpoint. DBWR and LGWR start writing to disk at the same time. Or is commit is issud.

while both DBWR and LGWR are writing the same SCN to disk we have an instance failure.

now since all of LGWR is not safely in the redo log, the data is not considered committed. HOWEVER,. DBWR has already started writing to the datafile thereby CHANGING what is in the datafile.

how does oracle recover this? Does it use rollback? it cant roll forward since all the data is not in the redo logs. Received on Wed Jun 18 2003 - 22:10:17 CDT

Original text of this message

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