Re: Oracle Internals: Transactions vs. Redo Logs

From: Joel Garry <joelga_at_rossinc.com>
Date: 1996/10/30
Message-ID: <1996Oct30.232618.10165_at_rossinc.com>#1/1


In article <32762509.31D2_at_econnect.ca> Yudong Sun <ysun_at_econnect.ca> writes:
>I'm still not clear regarding transactions and redo logs. Here's
>what I understand:
>
>- On-line transactions happen immediately in memory
>- Another writer process, working with a little delay, reads the
>memory and writes the transactions into BOTH the redo logs and
>the physical datafiles

Incorrect.

>- The redo logs are there, so that the backup is easier, as backing
>up the logs to tape is way less time consuming than backing up
>the physical datafiles.
>- When database recovery is necessary, restore the backup copy
>of the physical datafiles and then apply all the redo logs
>accumulated since the physical datafile backup
>- Corrolary:
> - The physical datafiles are always as up to date
> as the redo logs, redo logs being there to
> facilitate backup

Incorrect.

> - Since transactions happen instantaneously only
> in memory and the writer process operates with
> a little delay, in case of power failure,
> recoverable transactions are those in the redo logs
> and some latest transactions in memory are lost.
>
>Is this correct? Thanks in anticipation.

Not really. The transactions are timestamped, and the redo log files are done first by a separate process called the Logwriter. The idea is to be able to use the redo log files to catch up the database files, rolling forward committed transactions and rolling back uncommitted transactions, to a particular time. The dirty SGA buffers are only written to the database when the DBWR feels like it. You can force checkpoints to make the DBWR write out more often manually, or with init parameters, if you want to force things to be like you say. See the Oracle Server Concepts manual on database recovery, and Memory Structures and Processes. At most, three seconds between log writes, and groups of commits may be written with one write.

jg

>
>Yudong

-- 
Joel Garry               joelga_at_rossinc.com               Compuserve 70661,1534
These are my opinions, not necessarily those of Ross Systems, Inc.   <> <>
%DCL-W-SOFTONEDGEDONTPUSH, Software On Edge - Don't Push.            \ V /
panic: ifree: freeing free inodes...                                   O
Received on Wed Oct 30 1996 - 00:00:00 CET

Original text of this message