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: Redo Log Question

Re: Redo Log Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 30 Jan 1999 01:38:50 GMT
Message-ID: <36b461c0.1820798@192.86.155.100>


A copy of this was sent to Ed Prochak <edprochak_at_interfacefamily.com> (if that email address didn't require changing) On Fri, 29 Jan 1999 17:08:30 -0500, you wrote:

>I forget the error, snapshot too old or something like that, but
>an error is returned and the transaction aborted.
>

no it is not. transactions can definitely span and wrap log files (i can have 2 512k log files and update 10meg of data, it will be slow but it will succeed).

snapshot too old happens during a select, not during an update transaction.

the answer to the question is "the same thing it does in archive log mode"...

Oracle stores redo in redo logs.
Oracle stores undo in rollback.

Before a log file can be reused, all blocks affected by redo in that log file must be checkpointed (including rollback blocks). Every log switch fires a checkpoint in the background and before we wrap back to the first log file, the checkpoint must be completed.

In the example, when we wrap back to the 'first' log file, we will have checkpointed (flushed to disk) all blocks so we would not need to 'redo' them. This includes the rollback segment blocks (we won't need to redo the undo at this point, it is flushed to disk). If the system fails at this point, we can rollback because all of the undo we need is safely stored in disk in the rollback segment.

As long as you have enough rollback for the transaction, you can have very small amounts of online redo log files. The rollback will be flushed as part of the normal checkpoint process and won't need to be redone.

Remember, Oracle logs only contain REDO, no UNDO data. They are not used to rollback in any circumstance. They can only redo transactions not undo them. In a roundabout way, undo is in the redo since rollback is logged but we don't process undo from redo, only redo....

>Either make a smaller transaction, or bigger redo logs.
>
>
>Alan Black wrote:
>>
>> Hi,
>>
>> If you're running Oracle in non-archive log mode and you have a large
>> transaction that has not been committed before Oracle is ready to over-
>> write the redo log that contains the start of the transaction - what
>> does Oracle do ?
>>
>> I think this makes sense.
>>
>> Alan
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Jan 29 1999 - 19:38:50 CST

Original text of this message

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