Database Reference
In-Depth Information
The timestamp you provide must evaluate to a valid format for an Oracle timestamp. You can also explicitly
specify a time, as follows:
SQL> flashback table inv to timestamp
to_timestamp('14-jan-15 12:07:33','dd-mon-yy hh24:mi:ss');
FLASHBACK TABLE TO RESTORE POINT
A restore point is a name associated with a timestamp or an SCN in the database. You can create a restore point that
contains the current SCN of the database, as shown:
SQL> create restore point point_a;
Later, if you decide to flash back a table to that restore point, first enable row movement:
SQL> alter table inv enable row movement;
SQL> flashback table inv to restore point point_a;
The table should now contain transactions as they were at the SCN associated with the specified restore point.
Flashing Back a Database
The Flashback Database feature allows you to perform an incomplete recovery back to a point in time in the past.
Flashback Database uses information stored in flashback logs; it doesn't rely on restoring database files (as do cold
backup, hot backup, and RMAN).
Flashback database isn't a substitute for a backup of your database. If you experience a media failure with
a data file, you can't use Flashback database to flash back to before the failure. If a data file is damaged, you have to
restore and recover, using a physical backup (hot, cold, or rMaN).
Tip
The Flashback Database feature may be desirable in situations in which you want to consistently reset your
database back to a point in time in the past. For instance, you may periodically want to set a test or training database
back to a known baseline. Or, you may be upgrading an application and, before making large-scale changes to the
application database objects, mark the starting point. After the upgrade, if things don't go well, you want the ability to
quickly reset the database back to the point in time before the upgrade took place.
There are several prerequisites for Flashback Database:
The database must be in archivelog mode.
You must be using an FRA.
The Flashback Database feature must be enabled.
See Chapter 2 for details on enabling archivelog mode and/or enabling an FRA. You can verify the status of these
features using the following SQL*Plus statements:
SQL> archive log list;
SQL> show parameter db_recovery_file_dest;
 
 
Search WWH ::




Custom Search