Professional Documents
Culture Documents
|. I a\ \t
a- -
DATABASE
a\ rt
.U
o
r) a\
\t
L
''_\ I
What is Flashback?
Flashback is a revolutionary technology in recovery; this technique had been introduced and enhanced over time to minimize applications downtime caused by human errors. Flashback can be used to recover committed changes if were done by mistake, recover dropped tables, and compare before and after image of data with minimal efforts.
lY t'''*J-q" utt
u
Flashback Logs
Flash Recovery Area Data base
f-'";A
Flashback Techniques
Oracle's flashback technologies have implemented different techniques that suite almost every type of human error requiring recovery. The types of Flash back currently supported by Oracle Database 119l
. . o . . .
Fig. 1
: Flashback Architecture
Flashback Logs
The Flashback database technique implements new type of logs named flashback logs; the logs are generated on regular interval and dumped in the location specified by init.ora parameter DB.,,RECOVERY__FILE_DEST. They store entire block structure for the data before modification and used to rewind data changes when executing FLASHBACK DATABASE command.
Flashback Database
DBAs may have situations when multiple tables were modified by
write flashback data from the flashback buffer to the Flashback database logs, and those logs are circular, which means they will be reused. Flashback logs are stored in location specified by
DB_RECOVERY__FI LE_DEST parameter and have a lifespan depending on retention period parameter (in minutes)
batch jobs, or when related transaction take place and the result need to be undone, previously DBA had to perform point-in-time incomplete recovery by restoring backup and apply redo changes until a desired time to undo the changes, this process is time consuming and cause the database to had a longer downtime due to the restoration of all datafiles and apply a large number of archived logs. Using flashback database will reduce time for incomplete recovery using special architecture.
DB_FLASHBACK, RETENTION-TARGET.
When yOu usE FLASHBACKDATABASE command, the flashback logs are used to restore to the data status before the given time or marker. Redo data is used to roll forward to the desired flashback time and fill the gaps.
Flashback Retention
Your recovery requirements control lifespan of flashback logs in recovery area, init.ora parameter for this purpose
DB_FLASH BACK_RETENTION-TARGET
Architecture
When Flashback Database option is configured, the server starts a new buffer - Flashback Buffer - in the SGA, this buffer will log flashback data which are old images of data blocks before changes toke place. The size of Flashback Buffer depends on the size of the Log Buffer. A Background process named Recovery Writer
can be set to a number of seconds for how long you want to keep the logs, default value is 24 hours. This parameter can be altered dynamically using the ALTER SYSTEM SET SQL command.
Undo Tablespace
The size of the undo tablespace must be configured to support the required retention timeframe. The parameter U N DO'TABLESPACE specifies the tablespace name. The instance can have multiple undo tablespace, but one active undo tablespace at startup only.