Thursday, December 17, 2009

What is a Flash Recovery Area and how to configure it ?


Subject:
What is a Flash Recovery Area and how to configure it ?

Note:305648.1
Type:
BULLETIN

Last Revision Date:
06-OCT-2005
Status:
PUBLISHED
 
PURPOSE
-------
 
This document explains the basic design and configuration of a Flash Recovery Area.
 
 
SCOPE & APPLICATION
-------------------
 
DBA, Support.
 
 
What is a Flash Recovery Area and how to configure it ?
---------------------------------------------------------
 
The Flash Recovery Area is an unified storage location for all recovery-related 
files and activities in an Oracle database. All the files you need to completely
recover a database from a media failure are part of the Flash Recovery Area. 
 
Flash recovery extends the functionality of Oracle Managed Files to all recovery
related files (backup sets, image copies, and archived logs).  It also provides 
automated space management, by deleting older files (based on a user specified 
retention policy) to make room for newer ones. The user specifies only the 
location of a Flash Recovery Area, and the amount of disk space that Oracle is 
allowed to use for recovery related files. This feature is integrated with the 
10G MMON feature, so that out of space conditions can be handled through the 
standard Oracle monitoring framework.
 
Question : Why should we use a Flash Recovery Area?
 
As disk storage media is now competitive to tape with respect to purchase costs,
disk-based backup is an optimal and preferable storage mechanism. By using disks
for storage purposes, you gain significant benefits in terms of mass storage,and
you can randomly access your data in milliseconds rather than hours.  The 
previously expensive downtime in traditional recovery is exchanged for rapid 
data access and recovery times using cheap disk space.
 
The advantage that we have over tape is that tape is a sequential access device and disk is a random access
device. Hence the amount of time needed for restoring from the tape is eliminated
or reduced.
 
ASM (Automatic Storage Management) SUPPORT:
------------------------------------------
 
- RMAN can back up and restore files that are stored in ASM disk groups.In fact,
  RMAN is the only way to back up and restore ASM files.
- The Flash Recovery Area can be an ASM disk group.
- Backup sets and image copies can be created in ASM, either by automatically 
  creating them in the Flash Recovery Area, or by explicitly specifying an ASM 
  disk group for their location.
 
OMF (Oracle Managed Files) SUPPORT:
-----------------------------------
 
- Backup/Restore of OMF files is easier with RMAN as RMAN does not use 
  the long OMF file names in any commands.
- Backup sets and image copies can be created as OMF files by creating them in 
  the Flash Recovery Area. 
- RMAN can be used to migrate existing files to OMF.
 
 
Files are stored in the Flash Recovery Area:
--------------------------------------------
 
The files in Flash Recovery Area are classified as permanent or transient.
 
-- Permanent Files
   
   The permanent files (assuming these are configured to be stored in the 
   recovery area) are multiplexed copies of the current control file and online 
   redo logs. These cannot be deleted without causing the instance to fail. 
 
-- Transient Files
   
   Transient files include archived redo logs, datafile copies, control file 
   copies, control file autobackups, backup pieces and flashback logs. Oracle 
   manages these files automatically for deletion whenever space is required 
   in the Flash Recovery Area. They are deleted once they become obsolete under 
   the retention policy or have been backed up to tape. Any transient file in
   the flash recovery area once backed up to tape even if not deleted are
   internally placed on a file can be deleted list. Until there is a backup
   of the file on disk made to a teriary storage device it cannot be obsolete.
 
Initialization Parameters for Flash Recovery Area:
--------------------------------------------------
 
To enable the Flash Recovery Area, you must set the two initialization parameters:
 
-- DB_RECOVERY_FILE_DEST_SIZE : 
   It is the disk limit, which is the amount of space the flash recovery area is
   permitted to use. The minimum size of the Flash Recovery Area should be at 
   least large enough to contain archive logs that have not been copied to tape. 
 
   Note: This value does not include certain kinds of disk overhead:
   -Block 0 or the OS block header of each Oracle file is not included in this 
    size, so make sure to allow an extra 10% for this data when computing the 
    actual disk usage required for the Flash Recovery Area.
 
   -DB_RECOVERY_FILE_DEST_SIZE does not indicate the real size occupied on disk 
    when the underlying filesystem is mirrored, compressed, or in some other way
    affected by overhead not known to Oracle. 
   
-- DB_RECOVERY_FILE_DEST: 
   This initialization parameter is a valid destination to create the 
   Flash Recovery Area. The destination can be defined as a directory, 
   file system, or ASM disk group. 
 
   Note: The Flash Recovery Area cannot be stored on a raw file system.
 
   DB_RECOVERY_FILE_DEST_SIZE must be set before DB_RECOVERY_FILE_DEST. The two
   parameters must be set together to enable the FRA. In a RAC database, all
   instances must have the same values for these parameters. Even though there
   are multiple nodes they all share the same controlfiles.
 
 
Restrictions on Initialization Parameters:
------------------------------------------
 
- You cannot use the LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST parameters to 
  specify redo log archive destinations. You must always use the 
  LOG_ARCHIVE_DEST_n parameters in case you have configured flash recovery area.
  
- LOG_ARCHIVE_DEST_10 is implicitly set to USE_DB_RECOVERY_FILE_DEST if you 
  create a recovery area and do not set any other local archiving destinations.
  
- Multiple database can have the same DB_RECOVERY_FILE_DEST only if the DB_NAME 
  are different or if the DB_NAME is same (example the primary and standby 
  database) then the DB_UNIQUE_NAME parameter must be different for the
  databases.(3)
 
- For RAC the location of Flash Recovery Area must be on a cluster file system, 
  ASM or a shared directory configured through NFS. The location and disk quota 
  must be the same on all instances.
 
Example :
  Note 275083.1 Flash Recovery Area in 10G
 
References
----------
Note 293418.1 ORA-19815 WARNING DB_RECOVERY_FILE_DEST_SIZE 100.00% USED
Note 268197.1 New Background Processes In 10g
Note 273015.1 HowTo: 10G Migrating to RAC using Data Guard
Note 305817.1 FAQ - Flash Recovery Area feature of 10G

No comments:

Post a Comment