 |
|
11g FLASHBACK DATABASE
Oracle 11g New Features Tips by Donald BurlesonJune 29, 2015 |
Oracle 11g New Features Tips
Last but not least is FLASHBACK DATABASE, which
was also introduced in 10gR1, with completely different technology.
Flashback database was not enabled by default and could only
be enabled if the database was in ARCHIVELOG mode with the
flash recovery area defined. The parameters
db_recovery_file_dest and db_trecovery_file_dest_size are
used to define a flash recover area. In order to enable flashback
database, DBAs had to shutdown and startup mount the databaseand make an entry into the controlfile with:
ALTER
DATABASE FLASHBACK ON;
This would then start the recovery writer,
rvwr, background process and allocate the flashback buffer
in shared memory. Keep in mind that the size of the
flashback buffer is dependent on the size of the redo log
buffer. It reaches its full size of 16M if the redo log buffer
has a size of at least 8M.
The rvwr creates the copies of buffers of the
buffer cache before they are modified into the flashback buffer and
flushes them to disk based on a complex algorithm. Once enabled,
Oracle copied before images of buffers which had been
modified in the buffer cache to the flashback buffer. From there,
the rvwr would flush them to disk into the
flashback logs of the flash recovery area. These copies
could then be used to restore blocks directly in the datafiles
during a flashback database operation. This was done using sql*plus,
rman , or the OEM interface which again would call rman.
Via the flashback_retention_target
parameter, users were able to specify when flashback logs would age
out from the flashback logs automatically. This being, how far
to the database should flashbacked in the past could be specified.
Also, a restore point was introduced as a named point in
time to remember a timestamp or SCN that may be used for a
flashback.
Since Oracle Database 10gR2, it has been
possible to create guaranteed restore points. This enables the
ability to use flashback for exactly one point in time in the past.
As opposed to the normal restore points, these restore point are
reliable. They do not age out unless the DBA deletes them, and can
be used even if FLASHBACK is not enabled for the database. The
flashback logs then hold all block copies which need to flash the
database back to the particular point in time. This can be used for
situations such as application upgrades. Here is an example
situation ideal for the flashback database:
-
A guaranteed restore point is created
before upgrade
-
Upgrade completed
-
Results are unsatisfactory, but the whole
upgrade can easily be undone you using
-
flashback database