Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: redo records
The orignal poster's questions were:
Your question:
> Isn't a redo file supposed to contain only valid data change?
If by valid you mean commited, then no. Oracle stores all the data block vector changes (including rollback segments) to the redo log. The only changes that are guarenteed to be on disk are commited transactions. This is for reasons of logical data integrity. I think you might be asking, "why does Oracle bother to write uncommited changes to the redo log - isn't it a waste, I mean you don't need them to reconstruct a commited version of the database?" If this is your question, it seems like it is a whole lot easier to guarentee that all of the info needed for a long running change is in the redo log on disk if all changes are written out, because in that case we know if we flush our last changes to disk, because redo is sequential, we are guarenteed that the description of the entire transaction is on disk. If Oracle was waiting until a commit happened to store information about the commited changes the the wait could be quite a while for a large transaction, but because changes are logged as they happen then a commit can be rapid on the order of 5-20/1000ths of a second.
I might be assuming alot about the reader in this discussion. Let me know if you'd like more. Its a pretty big subject. I'm assuming that the idea that datablock from datafiles are not guarentted to be written on disk. They are changed in memory so if the machine goes down they are lost (except for those written out by the DBWR and the discusion of log file switches and checkpoints), but Oracle does guarentee that all we need to reconstruct the databse changes that were lost in live memory are in the redo logs.
> At rollback, will Oracle go into the
>redo file and find the record and change it or delete it?
No, as explained above there is no need to do such a thing
Best
Kyle
www.geocities.com/oraperf
Received on Sat Feb 10 2001 - 06:44:25 CST