OracleDB‎ > ‎

Flash Recovery

Oracle Flash Recovery Area (FASH_RECOVERY, FLASH_RECOVERY_AREA)

Lookup files in flash recovery

SQL> SELECT * FROM V$RECOVERY_FILE_DEST; NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES ---------- ------------ --------- ----------------- ---------------- u01/app/oracle 2147483648 1545718272 0 100 SQL>
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 43.57 0 96 BACKUPPIECE 28.41 0 4 IMAGECOPY 0 0 0 FLASHBACKLOG 0 0 0


flash recovery area check

#!/bin/sh export LD_LIBRARY_PATH=/usr/local/nagios/instantclient var=$(/usr/local/nagios/instantclient/sqlplus -s nagios/<pass>@//<ip>/EBPROD <<EOF | awk '{print $1}' set echo off termout off feedback off pages 0 newpage 1 head off select ROUND((SPACE_USED - SPACE_RECLAIMABLE)/SPACE_LIMIT * 100, 0) AS PERCENT_FULL FROM V\$RECOVERY_FILE_DEST; exit sql.sqlcode; EOF) echo Percent Full: %$var if [ $var -lt 90 ] ; then echo "200 OK"; exit 0; else echo "CRITICAL"; exit 1; fi

Comments