Monitoring Flashback Database
To monitor the ability to meet your retention target:
- View the Fast Recovery Area disk quota:
SQL> select estimated_flashback_size,flashback_size FROM V$FLASHBACK_DATABASE_LOG; ESTIMATED_FLASHBACK_SIZE FLASHBACK_SIZE ------------------------ -------------- 236912640 63766528
根据实际运行情况,估算磁盘配额比例
- Determine the current flashback window
SQL> SELECT oldest_flashback_scn,oldest_flashback_time FROM V$FLASHBACK_DATABASE_LOG; OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_T -------------------- ------------------ 4284553 15-MAY-13
最早能闪回到哪个点?时间点、SCN;
- Monitor logging in the Flashback Database logs:
SQL> SELECT * FROM V$FLASHBACK_DATABASE_STAT; BEGIN_TIME END_TIME FLASHBACK_DATA DB_DATA REDO_DATA ESTIMATED_FLASHBACK_SIZE ------------------ ------------------ -------------- ---------- ---------- ------------------------ 15-MAY-13 15-MAY-13 32456704 39747584 31642112 0 15-MAY-13 15-MAY-13 3506176 4407296 1249792 101498880 15-MAY-13 15-MAY-13 3481600 4399104 1229824 106487808 15-MAY-13 15-MAY-13 8298496 11722752 2757632 115752960
V$FLASH_RECOVERY_AREA_USAGE
You can query V$FLASH_RECOVERY_AREA_USAGE to view the flash recovery area disk space usage.
SQL> SELECT file_type,percent_space_used AS used,percent_space_reclaimable AS reclaimable,number_of_files AS "number" FROM V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE USED RECLAIMABLE number -------------------- ---------- ----------- ---------- CONTROL FILE 0 0 0 REDO LOG 0 0 0 ARCHIVED LOG 62.72 0 188 BACKUP PIECE 11.37 0 2 IMAGE COPY 0 0 0 FLASHBACK LOG .59 0 4 FOREIGN ARCHIVED LOG 0 0 0 7 rows selected.