Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: commit point..
In article <39354868.8DD224DC_at_student.qut.edu.au>, Peter
<bl.koh_at_student.qut.edu.au> wrote:
>Hi, i'm curious at the importance of Commit point in a
transaction..
>what is the difference btn commit point and checkpoint? and how
is
>commit point importatnt?.. tks..
>Peter
>
>--
>The world don't want to be saved, only left alone.
> - Megadeth (Elysian Fields)
>
>
A commit ends a transaction, and should be the placed at the
point where a logical unit of work completes or fails for the
whole of the activity in progress. That is if table A and table
B have a one to one relationship then the commit should be done
only after the insert to table A and table B both completed
successfully. Writing the transaction such that the insert to A
could be commited and the associated insert to B has not taken
place would violate the unit of work concept and could lead to
inconsistent data.
A checkpoint is a database level event that causes all dirty, i.e., changed, database buffers to be flushed to disk and the file headers updated so that the database files are at a consistent point in time. The recording of the checkpoint in the file headers, redo logs, and control file provides Oracle with markers to be used in the event of an instance or media failure to recover the database to.
You can find a good explanation of recovery with roll forward and rollback in the Concepts manual.