FLASH RECOVERY AREA (FRA)
******************************************************************************Important note, this is an attempt to understand the basics of Oracle Database administration, please ensure you verify it with Oracle documentation
****************************************************************************************
Typically backups are stored in backup location
for example on a server we have assigned the backup location as "/backup"
Once we have decided on a backup location, we can configure RMAN to send backups to this location.
for ex-->
RMAN> configure channel device type disk format '/backup/ora_%U';
Before FRA the backups would eventually fill up the file system(reserved for backups, in our case "/backup") & needed DBA attention to ensure.. there is certain space available or else backups fails because of inability to write on this location.
One of the benefits of using FRA, where in a DBA defines what files are to be backed up in FRA, depending on the size & retention policy/settings defined in Database, RMAN will clear up the backup location (depending on recovery/retention settings) & thus avoid any failure of backups for lack of space without any DBA intervention.
so DBA's from 10g version have the option of defining FRA
Q) What to look out for while defining FRA-->
FRA location, size & retention settings
Q) What kind of files can be placed in FRA?
Archived logs, RMAN backups & other recovery related files
This Q can also be answered in another way--> permanent & transient files
Permanent files--> mirror copies of redologs, multiplexed copies of current control files
Tranisent files--> archived logs, copy of control file, control file auto-backups, backup pieces, copies of datafiles, incase of Flashback DB ( flashback logs)
Another advantage of FRA
Database governs the files in FRA & retains those which are ONLY required for recovery.
Q) What can be the location for FRA--->
Any file system or diskgroup but NOT raw file system.
Q) How to enable FRA
First set db_recovery_file_dest_size & then db_recovery_file_dest
To enable fra
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 10G SCOPE=BOTH SID='*';
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/flash_recovery_area' SCOPE=BOTH SID='*';
For ASM
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '+diskgroupname' SCOPE=BOTH SID='*';
Q) How to disable FRA
To disable
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='' SCOPE=BOTH SID="*";
select name, space_limit, space_used, space_reclaimable from v$recovery_file_dest;
View to find out the percentage of the total disk quota used by different types of files
SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;
SQL>SELECT name, space_limit/1024/1024/1024 "AllocSpaceGB", space_reclaimable/1024/1024/1024 "spacereclGB", number_of_files FROM V$RECOVERY_FILE_DEST;
NAME AllocSpaceGB spacereclGB
---------------------------------------- ------------ -----------
H:\oracle\oradata\dpapp316\flash_recover 40 0
y_area
SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 9.72 0 228
BACKUPPIECE 65.48 0 19
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0
6 rows selected.
No comments:
Post a Comment