Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: why does an insert procude rollback segment data?
utkanbir wrote:
> Hi Gurus,
> As the subject explains , i am new with oracle. I am sorry if the
> question is very simple. The mechanism uses a rollback segment (or
> undo) concept , which stores before-images , and redo log concept
> which stores transaction information. Am i right? Guessing that i am
> right , my question comes: Does an insert statement needs rollback
> segment? I dont think so because insert statement does not change a
> block , but creates a new one so there is no before image record. If
> so , what is the before image of an insert statement?
>
> Kind Regards,
> hope
The before image of an insert is the rowid of where the insert is about to happen. If you were to rollback an insert, you'd have to know where to remove data from, wouldn't you?
Likewise, the after-image of a delete is the rowid of where the data used to be, because if you rolled it back, you'd have to know where, exactly, to re-insert the data.
Undo only contains before images. Redo contains both before and after images.
Regards
HJR
Received on Mon Sep 29 2003 - 15:27:09 CDT