What is the difference between undo tablespace and online redo log files.

Advertisement

what is the difference between undo tablespace and online redo log files. I am confused
as per my knowledge undo tablespace is used to store the undo information when a table is being updated so that, just incase we need to rollback a transaction we know what was present in the table earlier.
when a transaction fails the SMON performs the rollback of the data.
This undo data is stored in the undo tablespace and read consistency if any is enforced.
is my understanding till here correct?
Now, can this undo data/before image not be stored in the redo log buffer and online redolog files?
can redo-log files not store this information?
in fact, is it that when undo tablespaces exist in a database, the undo data/before image is stored in both the undo tablespace and also the redo log files?
kindly clarify my doubt.
thank you.

Advertisement

This question has been asked many times before. The answer is always the same.
Yes, redo contains the before image of data (and the after-image). Therefore, it **COULD** be used to roll back a transaction.
BUT... Redo is written sequentially. Using it to rollback your transaction would involve reading through all the redo written by maybe thousands of other people. It would be painfully slow.
Your transaction is, however, directly linked to just the UNDO that it generates (which is JUST the before image of the data). So, your undo is your undo and doesn't share space with anyone else's undo. Therefore, using it to roll back YOUR transaction is fast.
The fact that undo is only the before image of the data also makes it faster than wading through a sea of before and AFTER images as you'd find in redo. About twice as fast, in fact, since there's half the data. Roughly.
Redo also gets written and flushed to disk whenever there's a commit, 3 seconds are up or too much (1MB, actually) redo gets generated between flushes caused by other factors. Your redo gets flushed when those things happen, even if you haven't actually committed your transaction. And redo logs recycle themselves, meaning that your redo -even if your transaction hasn't been committed yet- can be over-written by later transactions. Try rolling back when that's happened, if redo was the source of your rollback data!
Undo, however, cannot be over-written if the transaction has not been committed. Ever. If you don't commit for three years, there will be three years' undo stored in your database (assuming you had the space, of course!).
I could go on, but that will do. Redo is there fore RECOVERY, after catastrophe. Undo is there for read-consistency (and the occasional change of mind). Two different functions. Two different mechanisms. Each one highly tuned to doing what it does, why it does it, most efficiently and effectively.

November 30, -0001

What is the difference between undo tablespace and online redo log files.

what is the difference between undo tablespace and online redo log files. I am confused as per my knowledge undo tablespace is used to store the undo information when a table is being updated so that, just incase we need to rollback a transaction we

What is the difference between a tablespace, a segment and an extent ?

What is the difference between a tablespace, a segment and an extent ? Please explain in layman terms since I'm a total newbie to Oracle. Regards GonyHi, These are logical structure of database 1. Tablespace : A database is divided into logical stora

What is the difference between full checkpoint and incremental checkpoint?

What is the difference between full checkpoint and incremental checkpoint? And what is checkpoint queue? Can someone clarify these concepts? Thanks!Hi, there are different types of checkpoints: - Full checkpoint: => DBWR writes all dirty buffers from

What is the difference between Session timeout and Short Session timeout Under Excel Service Application -- session management?

Under Excel Service Application --> session management; what is the difference between Session timeout and Short Session timeout?Any call made from the API will automatically be set to the "Session Timeout" period, no matter what. Calls made

What is the difference between 'Shopping cart' and 'Team cart'

Hi,    There a knowledge about 'Team Cart' in SRM 7.0 .I want to know what is the difference between 'Shopping cart' and 'Team cart'?    Thank you !    best RegardsHi, SRM self-service procurement and requisitioning process was generally focused on t

What is the difference between Grid computing and Cluster ?

Heh Friends What is the difference between Grid computing and Cluster ? /sumitYou can't easily switch a server from being a database server into an application server when the load on your system changes. That's only because you didn't architect your

What is the difference between P35 Platinum and P35 Neo2 FIR?

What is the difference between P35 Platinum and P35 Neo2 FIR? P35 Platinum P35 Neo2 FIR BIOS is identical?The P35 Neo2 is FIR is actually listed as P35 Neo2 FR/FIR. It is what you could call a "modular mainboard".  Even if it has the same PCB as

What is the difference between partition-count and the number of caches?

What is the difference between partition-count and the number of caches in Coherence? Are they same?Those are totally orthogonal concepts. For more, look at this thread where I answered your other related questions and explain this, too: Where can I

What's the difference between SharePoint 2013 and Office 365 Team Sites?

Hi there, What are the differences between SharePoint 2013 and Office 365 Team Sites? If I would like to develop a professional corporate website with SharePoint technology (because the company allready uses Office 365), do you recommend using ShareP

What is the difference between Subcontracting PO and External refurbishment

What is the difference between Subcontracting PO and External refurbishment? How it affects valuation and material movements? When to be used which process?Hi, Check this link, It would be useful for you. http://searchsap.techtarget.com/search/1,2938

What is the difference between Message Monitoring and End-to-End monitoring

Hi experts,what is the difference between Message Monitoring and End-to-End monitoring? and What is the difference between Value Mapping and Fix value? Thanks, ManojHII You use message monitoring in the following cases: ● To track the status of messa

What are the difference between 4.6c and 4.7 versions?

what are the difference between 4.6c and 4.7 versions? if any please give me answer regards ramanjiHi, Upgrade SAP or Installation of SAP R/3 and ECC What is ECC?  Where to find the installation steps of  ECC 5/6.0 with SQL as database and on windows

What is the difference between customer exits and user exits?

hello friends, what is the difference between customer exits and user exits?Hi User exit - A user exit is a three character code that instructs the system to access a program during system processing. SXX: S is for standard exits that are delivered b

What is the difference between document class and normal class

Hi, Please let me know what is the difference between document class and normal class. And I have no idea which class should call as document class or call as an object. Thanks -Actionscript Developerthe document class is invoked immediately when you

What is the difference between access specifiers and access modifiers?

what is the difference between access specifiers and access modifiers? are they same? if not what is the difference.Access Specifier are used to specifiy how the member variable ,methods or class to other classes.They are public ,private and protecte

HT4759 What is the difference between Mobile Me and iCloud?

What is the difference between Mobile Me and iCloud?Mobile Me doesn't exist. It was shut down 2 years ago. iCloud is its replacement.Read other 2 answers

What is the difference between Topic Keywords and Index File Keywords?

What is the difference between Topic Keywords and Index File Keywords? Any advantages to using one over the other? Do they appear differently in the generated index? RH9.0.2.271 I'm using WebhelpHi there When you create a RoboHelp project you end up

What's the difference between segment filtering and reduced message type

Hi gurus, What's the difference between segment filtering and reduced message type? It seems they have the same functionality: Reduce the segment while idoc is generated. Thanks in advance.Hi, BD53 is for IDoc Reduction. this allows you to create a r

What is the difference between Video-out and mirroring?

What is the difference between Video-out and mirroring? I can't get iPhone 4 video to work on my TV screen I have just bought an MD098ZM/A (Apple 30-pin Digital AV Adapter). I am struggling to get it to show a picture on my TV. I know I'm doing somet

What is the difference between EA6500-NP and EA6500 (no -NP suffix)?

Hello there. What is the difference between EA6500-NP and EA6500 (no -NP suffix)? I see some stores (like Staples) advertising a clearance price on the EA6500 (without the -NP suffix). Just curious. Thank you very much.Panziesforpanties is correct. C