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: why does an insert procude rollback segment data?

Re: why does an insert procude rollback segment data?

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 30 Sep 2003 06:27:09 +1000
Message-ID: <3f78965c$0$28040$afc38c87@news.optusnet.com.au>

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

Original text of this message

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