Showing posts with label Flash Recovery Area. Show all posts
Showing posts with label Flash Recovery Area. Show all posts

Monday, September 17, 2007

How to disable use of Flash Recovery Area for Archivelogs and Backups

1-Archive to another file system location in addition to the Flash Recovery Area

SQL>create pfile=’init.ora’ from spfile;

add the following line to the init.ora:

log_archive_dest_n=’’ eg

log_archive_dest_1='LOCATION=D:\oracle\product\10.2.0\oradata\V102\Arch'

Restart the instance using the amended pfile and recreate the spfile:

SQL>startup pfile=’init.ora’;

SQL>create spfile from pfile;

2-Archive to another file system location instead of the Flash Recovery Area

Create a parameter file (as above)

Add the following line to the init.ora:

log_archive_dest_n (as above)

Remove the following parameter in the init.ora:

log_archive_dest_10

Restart the instance using the amended pfile and recreate the spfile

3-Avoid use of the Flash Recovery Area altogether (not recommended)
Create a parameter file (as above)

Add the following line to the init.ora:

log_archive_dest_n (as above) or

log_archive_dest=''

Remove the following parameter in the init.ora:

log_archive_dest_10

db_recovery_file_dest
db_recovery_file_dest_size

Restart the instance using the amended pfile and recreate the spfile.


Ref:Metalink Note:297397.1

Friday, September 7, 2007

alert for flash_recovery_area

If you have take the following error in alert.log then
You have following choices to free up space from flash recovery area:1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard, then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating system command was used to delete files, then use RMAN CROSSCHECK and DELETE EXPIRED commands.
This means you do not have enough space in db_recovery_file_dest_sizecheck V$RECOVERY_FILE_DEST
KTP5>SELECT * FROM V$RECOVERY_FILE_DEST;
NAME--------------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/kondor2/oracle/oraInventory/flash_recovery_area 2,147E+09 2,147E+09 0 85
also we can look to dba_outstanding_alerts
KTP5>SELECT object_type, message_type, message_level, 2 reason, suggested_action 3 FROM dba_outstanding_alerts;

OBJECT_TYPE MESSAGE_TYPE MESSAGE_LEVEL
---------------------------------------------------------------- ------------ -------------
REASON
----------------------------------------------------------------------------------------------------
SUGGESTED_ACTION----------------------------------------------------------------------------------------------------
RECOVERY AREA Warning 1db_recovery_file_dest_size of 2147483648 bytes is 97.37% used and has 56553472 remaining bytes availYou have following choices to free up space from flash recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard, then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating system command was used to delete files, then use RMAN CROSSCHECK and DELETE EXPIRED commands.

so we can increase DB_RECOVERY_FILE_DEST_SIZE
KTP5>alter system set DB_RECOVERY_FILE_DEST_SIZE=3g scope=both;

You may also need to consider changing your backup retention policy rman
RMAN> connect target
connected to target database: KTP5 (DBID=4032373710)
RMAN> configure retention policy to recovery window of 7 days;
RMAN> delete expired backup;