Pages

Saturday, May 14, 2011

Guaranteed Restore Point

A Guaranteed Restore Point ensures that the database can be reverted back to its state at the restore point SCN regardless of the DB_FLASHBACK_RETENTION_TARGET initialization parameter setting. As it is always preserved, it must be dropped explicitly. The disk space usage and the performance overhead of logging for GRP is lower than normal flashback database logging because the database stores the before image of the first time modified block in flashback logs. Any subsequent modifications to the same block do not cause the contents to be logged.

Requirements:
1. The database must be running in ARCHIVELOG mode. 
2. The fast recovery area must be configured. See my blog at http://anandbitra.blogspot.com/2011/04/fast-recovery-area.html
3. If the flashback logging is not enabled, the database must be mounted to create the first GRP or if all previously created GRPs have been dropped.

Create GRP
SQL> create restore point before_app_upgrade guarantee flashback database;

Drop GRP
SQL> drop restore point before_app_upgrade;

List Restore Points
SQL> select name,scn,time,database_incarnation#,guarantee_flashback_database,storage_size from v$restore_point;

Considerations:
Dropping a tablespace or shrining a datafile can prevent flashback the affected datafiles to GRP. However, the shrunken file can be taken offline to flashback the rest of the database and then the shrunken datafile can be restored and recovered later.

Saturday, April 16, 2011

Fast Recovery Area

In Oracle 11gR2, the flash recovery area was renamed as fast recovery area. FRA is the unified location for the storage of backup and recovery related files.These files are managed by RMAN and flashback operations to reclaim the space for new files. FRA can contain the following files.
  • Archived redo logs
  • Flashback logs
  • RMAN backups
  • Online redo log
  • Controlfile
 The following parameters can be configured dynamically in order to setup FRA. 
  • DB_RECOVERY_FILE_DEST_SIZE
  • DB_RECOVERY_FILE_DEST
  • DB_FLASHBACK_RETENTION_TARGET  --> default value is 1440 min
Setup FRA
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=2G;
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='/u05/fra';

View FRA space usage
SQL> SELECT  * FROM V$RECOVERY_FILE_DEST;
SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;