Re: Flashback vs. rollback mechanism

From: Michael Austin <maustin_at_firstdbasource.com>
Date: Fri, 23 Jan 2009 21:10:35 -0600
Message-ID: <ZEvel.1959$PE4.87_at_nlpi061.nbdc.sbc.com>



Mladen Gogala wrote:
> In the newer versions of Oracle there are 2 distinct mechanisms for
> undoing the effect of transactions: rollback and flashback. Rollback
> method is transactional, it simply undoes the changes made to the blocks
> during the failed transaction while the flashback method is more akin to
> recovery. The differences between those two methods are numerous but the
> outcome will, in many cases be the same.

Except not. The rollback only "restores" the data involved in the current transaction. FLASHBACK table/database - restores back to an SCN-x (point in time) losing all other data post-SCN-x.

From:
Oracle® Database Administrator's Guide 10g Release 2  >>http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2371

  • Restores all data in a specified table to a previous point in time described by a timestamp or SCN.
  • Performs the restore operation online.
  • Automatically maintains all of the table attributes, such as indexes, triggers, and constraints that are necessary for an application to function with the flashed-back table. .....
  • Maintains data integrity as specified by constraints. Tables are flashed back provided none of the table constraints are violated. This includes any referential integrity constraints specified between a table included in the FLASHBACK TABLE statement and another table that is not included in the FLASHBACK TABLE statement. ....

> Should we expect to see some blending between rollback and flashback? I

Don't think so. Using a FLASHBACK-like mechanism to do a ROLLBACK is like using a 20lb sledge hammer to nail a miniature picture frame together (ie. does a lot more damage than good... :) ) If you were only executing one very large transaction that inserted 100's or thousands of records AND was the only thing running AND the transaction committed - then a flashback-like mechanism is definitely an option.

> believe that in the future releases the fine line between the rollback and
> flashback will be blurred, possibly by introducing "fast rollback" which
> will use recovery-like methods characteristic of the flashback but will
> be used within transaction as a "get me my old values back" mechanism.
>
> This, of course, is just a mental experiment. Any thoughts?
>

I would say your experiment has a long way to go for success... :) Received on Fri Jan 23 2009 - 21:10:35 CST

Original text of this message