THE FLASH RECOVERY AREA.

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

THE FLASH RECOVERY AREA.

Rating:

With the advancement in technology, there has been a drastic increase in the information that a database can hold. Big enterprises and organizations have to store billions of records to be always up-to-date with all the information required. In such a scenario, the risk of data loss also goes up. There are many tools and techniques available in Oracle 10g that can provide backup and recovery in case of data loss. Disks have an advantage over magnetic tapes, as even a slow disk can access data randomly, faster than a magnetic tape.

The flash recovery area is the most powerful tool available in Oracle 10g that plays a vital role in performing database recovery operations.

Definition: The flash recovery area can be defined as a single, unified storage area that keeps all the database recovery related files and performs recovery activities in an Oracle database.

Following are the various entities that can be considered as the flash recovery area:

  1. A single directory
  2. An entire file system
  3. Automatic storage management (ASM)

Note: The flash recovery area is shared among databases in order to optimize the usage of disk space for database recovery operations.

In case of a media failure or a logical error, the flash recovery area is referred to retrieve all the files needed to recover a database.

Components of the flash recovery area:

The flash recovery area contains the following:
  • Control files: During database creation, a copy of the control file is created in the flash recovery area.
  • Archived log files: During the configuration of the flash recovery area, the LOG_ARCHIVE_DEST_10 parameter in init.ora file (the initialization parameter) is automatically set to the flash recovery area location. Archived log files are created by ARCn processes in the flash recovery area location and the location defined by LOG_ARCHIVE_DEST_n.
  • Flashback logs: Flashback logs are kept in the flash recovery area when flashback database is enabled
  • Control file and SPFILE backups: The flash recovery area also keeps the control file and SPFILE backups, which is automatically generated by Recovery Manager (RMAN) only if RMAN has been configured for control file autobackup.
  • Datafile copies: The flash recovery area also keeps the data file copies.
  • RMAN backup sets: The default destination of backup sets and image copies generated by RMAN is the flash recovery area
Note: RMAN also transfers the restored archive files from tape to the flash recovery area in order to perform recovery operations.

Setting up the flash recovery area using SQL commands:

Following are the two-initialization parameters that should be defined in order to set up the flash recovery area:
  • DB_RECOVERY_FILE_DEST_SIZE
  • DB_RECOVERY_FILE_DEST
Reason to define the above mentioned parameters:
The DB_RECOVERY_FILE_DEST_SIZE and DB_RECOVERY_FILE_DEST are defined to make the flash recovery area usable without shutting down and restarting the database instance.

Note: DB_RECOVERY_FILE_DEST_SIZE is defined before DB_RECOVERY_FILE_DEST in order to define the size of the flash recovery area.
The size of the flash recovery area should be large enough to hold a copy of all data files, all incremental backups, online redo logs, archived redo log not yet backed up on tape, control files, and control file auto backups. The following table shows the various estimated sizes for all the database elements in the Flash Recovery area:

Database Elements  Estimated size (MB)
Image copies of all datafiles  
1200
Incremental backups  
256
Archived redo logs retained for backup to tape  
96
Online redo logs  
48
Control files  
6
Control file auto backups  
6
Flash recovery logs  
96
Oracle recommended size  
1708
Minimum size  
96


Configuring DB_RECOVERY_FILE_DEST_SIZE

ALTER SYSTEM
set db_recovery_file_dest_size = 10g scope = both;

In the above example the size of the flash recovery area is 10GB and the initialization parameter takes effect immediately and stays in effect even after the database restarts.

The role of the DB_RECOVERY_FILE_DEST parameter is to specify the physical location where all the flash recovery files are to be stored.

An example of how this parameter specifies the location is given below:
ALTER SYSTEM
set db_ recovery_file_dest = '/OFR1' scope = both;


In the above example OFR1 is the name of the directory that has been specified as the physical location where all the flash recovery files are stored in the flash recovery area.

Note:
  • If the value specified in the db_recovery_file_dest parameter is cleared then as a result the flash recovery area is disabled.
  • DB_RECOVERY_FILE_DEST_SIZE parameter cannot be cleared up prior to the DB_RECOVERY_FILE_DEST parameter.
Role of Enterprise Manager Database Control in creating the flash recovery area:

The flash recovery area can be created and maintained using EM Database Control.
The steps that are followed to create the flash recovery area from EM Database Control are:
  1. Click the maintainance tab
  2. Click the Configure recovery settingslink

Management of the flash recovery area

As the DB_RECOVERY_FILE_DEST_SIZE parameter specifies the space for the flash recovery area. In a situation when the space specified by the above-mentioned parameter does not prove enough for all flash recovery files, then in such a case Oracle itself keeps track of those files that are not required on the disk. These unnecessary files are then deleted to resolve the space issue in the flash recovery area.

Whenever a file is deleted from the flash recovery area, a message is written in the alert log.

Note:
  • There are various other circumstances in which messages are written in the alert log. Those circumstances are mentioned below:
    1. When none of the files are deleted.
    2. When the used space in the flash recovery area is 85 percentage (a warning).
    3. When the used space in the flash recovery area is 97 percentage (a critical warning)
  • The warning messages issued can be viewed in the DBA_OUTSTANDING_ALERTS data dictionary view and are also available in the EM Database Control main window.
To recover from these alerts, a number of steps can be taken as remedial options and these are:
  1. Adjust the retention policy to keep fewer copies of data files.
  2. Reduce the number of days in the recovery window

In case the retention policy does not have any loophole ie- the retention policy is sound then the steps taken to recover from the alerts are:
  1. More disk space should be added.
  2. backup some of the flash recovery files to another destinations such as another disk or tape drive.

Monitoring the flash recovery area:

The most crucial information about the flash recovery area is given by the DB_RECOVERY_FILE_DEST_SIZE initialization parameter. The other information about the flash recovery area can be obtained via the EM Database Control interface. The information thus provided includes:
  1. The location of the flash recovery area.
  2. The size of the flash recovery area.
  3. The flash recovery area in use.
  4. An option to configure an advanced recovery feature, flashback database

Note: All the information about the flash recovery area are not shown via EM Database Control interface. To obtain the detailed information V dynamic performance view is used.


Rating:



Other articles

Click here to Article home

MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+

Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g, 1Z0-040: Upgrade to OCA 10g Fundamentals I, Oracle Fundamentals II, Admin I, Oracle Admin II, PL/SQL CIW foundation    Photoshop ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.
 
HACKER SAFE certified sites prevent over 99.9% of hacker crime.