Rewinding a Database Using Oracle Flashback Database
Unlike the other flashback features, Oracle Flashback Database operates at a physical
level. When you use Flashback Database, your current data files revert to their
contents at a previous time. The result is similar to database point-in-time recovery,
but Flashback Database can be much faster because it does not require you to restore
and recover data files. Also, Flashback Database requires limited application of redo
data as compared to media recovery.
Flashback Database uses flashback logs to access previous versions of data blocks and
also uses some data in the archived redo log files. To have the option of using
Flashback Database to repair your database, you must have configured the database to
generate flashback logs as explained in "Configuring Recovery Settings" on page 9-10.
To perform a Flashback Database operation:
1. Connect RMAN to the target database as described in "Connecting to the Target
Database" on page 9-9.
2. Identify the desired SCN, restore point, or point in time to which the flashback
database must be performed. This example rewinds the database to a specified
point in time.
3. Shut down the database consistently, ensure that it is not opened by any instance,
and then mount the database.
4. Flash back the database to the desired time.
In this example, you need to flashback the entire database to the time specified in
the TIME clause.
FLASHBACK DATABASE to TIME "TO_DATE('03/20/12','MM/DD/YY')";
5. Open the database read-only and run some queries to verify the database contents.
The following command opens the database in read-only mode:
ALTER DATABASE OPEN READ ONLY;
6. After confirming that the state of the database is as expected, make the database
available for updates by opening it with the RESETLOGS option.
... zobacz całą notatkę