Re: flashback?

From: <fitzjarrell_at_cox.net>
Date: Mon, 28 Jan 2008 10:45:12 -0800 (PST)
Message-ID: <933488f2-6313-44ef-87b9-ba30655262b1@s12g2000prg.googlegroups.com>


On Jan 28, 12:09 pm, nick <cupofjava1..._at_aol.com> wrote:
> Can someone tell me how flashback works?
> When I execute:
>
> execute dbms_flashback.enable_at_time(sysdate - 10/1440);
>
> What exactly is happening here? Does this mean that just for
> my session, all the tables of the database are as they were
> ten minutes in the past? How can Oracle possibly accomplish
> this?
>
> Thanks

It uses your UNDO segments and your undo_retention setting to 'rebuild' the data image at the specified time. Presuming you have sufficient undo retained to provide data for the 'window' specified you'll get your flashback query to return data as it was.

The tables aren't changed in any way; Oracle simply reconstructs the data image as of the given date/time/SCN using the UNDO segments. It's the same way Oracle provides a read-consistent image of the data during a query even when other users are actively executing inserts/ updates/deletes.

Flashback can be a very powerful tool. You might want to look here for a simple example of how flashback query can be of use:

http://oratips-ddf.blogspot.com/2008/01/resurrecting-dead-or-gee-i-thought-that.html

You can also check out the documentation at http://tahiti.oracle.com.

David Fitzjarrell Received on Mon Jan 28 2008 - 12:45:12 CST

Original text of this message