DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: UNDO generates REDO ???

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865

    Question UNDO generates REDO ???

    Hi,

    I have read in some sites that UNDO in-turn generates REDO. I am confused with this statement and want to clarify.

    As far as I know, UNDO is required to build the consistent data or to rollback the transaction. REDO is required to roll forward and roll back in case of recovery.

    In a senario where I am inserting rows into a empty table that maintains the UNDO records. Why this UNDO in-turn generates REDO and what is the use of it?

    I try to google it for clarification but didn't find satisfied answer. I appreciate If some give me a link to read and understand the process.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  2. #2
    Join Date
    Apr 2008
    Location
    Bangalore
    Posts
    96
    Hi,
    This is my understanding..If any mistakes please correct...

    REDO=is for recording all the changes in database.That is commited and uncommited transactions.

    UNDO=is for recording all uncommited transactions.That is once transaction gets commited the entry in undo will phase out depending on the retention policy.


    Coming to Crash Recovery

    Redo is used to roll forward the transactions while undo is used to rollback the transactions.During crash recovery what happens is first the redo entries are applied to datafiles and it is the process of roll forward.Please understand that in the process of roll forward undo is continously generated.After this instance opens and any uncommited transactions are rolled back using the undo data.


    Hope this clears your doubt to some extent...

    Now coming to question whether undo generatess some redo...I am not pretty sure....Can anyone throw more light on this...


    Regards,
    Mohith K.

  3. #3
    Join Date
    Feb 2009
    Location
    Kayseri, Turkey
    Posts
    15
    hope this help you

    Redo, Rollback and Undo

  4. #4
    Join Date
    Apr 2008
    Location
    Bangalore
    Posts
    96
    Thanks for the link...But i think the link doesn't really serve the purpose...

  5. #5
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Thanks Mohit for your views. I agree with your regarding roll forward and roll back.

    Thanks for the link Kesari.

    but still my primary question is unanswered. Is UNDO generates REDO? can some one shed some light on this?

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  6. #6
    Join Date
    Feb 2009
    Location
    Kayseri, Turkey
    Posts
    15
    Yes, UNDO generates REDO.

    Since Oracle uses the redo log to record all changes made to the database every undo means there is a redo accordingly.

    this section of oracle doc expains the mechanism :
    http://www.oracle.com/technology/dep...R_Overview.htm

  7. #7
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Thanks Kesari. I will go thru the link.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  8. #8
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    I find one document which is useful to understand the question in this post.

    http://asktom.oracle.com/pls/asktom/...22925097021874

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width