Databases Reference
In-Depth Information
Similarly, restore points are merely pointers to specific SCNs, so when you flash back to a specific restore point,
the database actually issues a flashback to the SCN associated with that restore point. Finally, the database records the
SCN when the database was opened with resetlogs; so, again, your flashback command to the last resetlogs operation
is merely the same as issuing the flashback to that SCN. You can check the SCN during the last resetlogs operation by
issuing the following query:
SQL> select resetlogs_change#
2 from v$database;
RESETLOGS_CHANGE#
-----------------
1070142
Flashback does not work in only one direction; it works both back and forth from a point. Of course, you can't
go to a point in time in the future, and you can go only as far back into the past as the flashback logs are available.
Figure 13-1 shows how the flashback works in both forward and reverse directions from a point.
Current SCN
=3000
1000
3000
2000
Flash Back to SCN 1000
Operation 1
Operation 2
Flash Back to SCN 2000
Figure 13-1. Flashback operations
Note that Operation 1 flashed the database from the current SCN (3,000) to SCN 1,000. After that was done,
before the database opened for read/write access, Operation 2 flashed the database back from SCN 1,000 to SCN
2,000, which is akin to rollforward operations, but we still call it flashback. You can do this operation up to any SCN
less than 3,000 any number of times to get to the precise position in time. The lower limit of SCN you can flash back to
depends on how much flashback log data is available in the fast recovery area.
to guarantee the ability to flash back to a point in time, you can create guaranteed restore points, discussed
in recipe 13-10.
Note
 
 
Search WWH ::




Custom Search