26
Recovery using archived logs
Approximately, 500 archived logs were generated during the table update on all four RAC instances.
Media Recovery is performed on the system where the restore/recovery session was started, RAC1 in
our case.
In our environment, it took 1hour 50 min to apply all 536 archived logs. In total 23GB redo
information.
Using the dynamic view V$RECOVERY_PROGRESS, we can monitor the status of the running
recovery. The following representation shows that 62 log files out of 536 have so far been applied at
a 14MB/s apply rate.
SQL> select TYPE,ITEM,UNITS,SOFAR,TOTAL from v$recovery_progress;
TYPE ITEM UNITS SOFAR TOTAL
---------------------------------------------------------------- -------------------------------- -------
Media Recovery Log Files Files 62 536
Media Recovery Active Apply Rate KB/sec 14709 0
Media Recovery Average Apply Rate KB/sec 14644 0
Media Recovery Redo Applied Megabytes 2917 0
Media Recovery Last Applied Redo SCN+Time 72219614 0
Media Recovery Active Time Seconds 194 0
Media Recovery Apply Time per Log Seconds 2 0
Media Recovery Checkpoint Time per Log Seconds 0 0
Media Recovery Elapsed Time Seconds 204 0
9 rows selected.
Recovery using incremental backup
After the table update, we perform an incremental backup instead of using archived logs recovery.
The total backup size is 16GB.
Although is an incremental backup, oracle has to read every single block (belonging to the POOL
datafiles) in memory to determine if the block has been modified since last backup. For this reason, it
can happen that the tape devices are not streaming. This may cause the incremental backup to take
longer than the full backup. In our case, it took twice as long as the full backup.
As it can be seen in the restore Session 7, the restore of the incremental backup took only 9 minutes.
No Media Recovery is needed as the table update has been recorded in the incremental backup.
Oracle incremental backup with block change tracking enabled.
Starting with Oracle10g, we can enable the block change tracking for incremental backups. Oracle
will keep a bitmap of changed blocks in the flash recovery area. When performing an incremental
backup, instead of scanning all blocks in the datafiles (as a normal incremental does), only the blocks
which are referenced in the bitmap will be read into memory and sent to tape. This functionality has
the following advantages:
• Reduces the time of an incremental backup
• Reduces the total load on the system
• Makes incremental backup a valid option
• Provides the same streaming speed as a full backup which enables tape streaming