Flashback Part 1

So what is that Flashback stuff all about? Generally, flashback comes into play if some kind of logical mistake occured, that you would like to correct – or at least find out what exactly happend. We have 3 kinds of flashback that only have that name in common while basing on completely other internal architecture.

1) flashback table to before drop

2) flashback query, flashback transaction query, flashback table to timestamp

3) flashback database

Today, we will look at 1)

If you have an Oracle Database of version 10g or higher, then by default tables are not dropped by the command

drop table t;

Instead, they get renamed to something like BIN$YO4ieOIZ5WngQKAK4QstLg==$0.

You can see that in SQL*Plus with the command show recyclebin or with select * from user_recyclebin;

As long as the extents of this renamed table are not being reused by some other segment that needs space in the datafile where the extents of  the “dropped” table reside, you can get that table back with the command

flashback table t to before drop;

This feature comes “for free” and has nothing to do with and no need for flashback logs that are invoked by the command alter database flashback on;

About these ads

,

  1. Dropping a table during SELECT « The Oracle Instructor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 2,889 other followers

%d bloggers like this: