{"id":2477,"date":"2025-01-23T16:44:35","date_gmt":"2025-01-23T16:44:35","guid":{"rendered":"https:\/\/w3buddy.com\/?p=2477"},"modified":"2026-01-15T13:19:08","modified_gmt":"2026-01-15T07:49:08","slug":"flashback-recovery-info-in-oracle-a-complete-guide","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/flashback-recovery-info-in-oracle-a-complete-guide\/","title":{"rendered":"Flashback Recovery Info in Oracle: A Complete Guide"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Flashback recovery is an essential feature in Oracle databases, allowing users to recover data quickly and efficiently. This guide provides a step-by-step explanation of how to retrieve complete flashback recovery information in Oracle, with tips for adjusting paths according to your system setup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Purpose of Flashback Recovery<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle&#8217;s flashback recovery offers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The ability to restore a database to a specific point in time.<\/li>\n\n\n\n<li>Undo unwanted changes.<\/li>\n\n\n\n<li>Improved reliability for the recovery process.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to Retrieve Flashback Recovery Info in Oracle<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Follow these steps to gather flashback recovery information and save it in an HTML format:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Run the Script<\/h2>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Copy the script provided below into a text editor.<\/li>\n\n\n\n<li>Replace the default file path C:\\flashback_info.html with your preferred location, such as \/home\/oracle\/flashback_info.html for Linux systems, or adjust it according to your operating system requirements.<\/li>\n\n\n\n<li>Save the script and execute it in Oracle SQL*Plus.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Script to Generate Flashback Recovery Info<\/h2>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SET MARKUP HTML ON spool on\nSET TERMOUT OFF\nSPOOL \/home\/oracle\/flashback_info.html\nSET LINESIZE 132 SERVEROUTPUT ON PAGESIZE 1000;\nALTER SESSION SET NLS_DATE_FORMAT = 'mm\/dd\/yy hh24:mi:ss';\n\nCOLUMN name FORMAT A30\n\n-- Display recovery-related parameters\nSHOW PARAMETER recovery;\nSHOW PARAMETER retention;\nSHOW PARAMETER keep;\n\n-- Flashback log information\nSELECT * FROM v$FLASHBACK_DATABASE_LOGFILE;\nSELECT * FROM V$FLASHBACK_DATABASE_STAT;\nSELECT * FROM V$FLASHBACK_DATABASE_LOG;\nSELECT * FROM x$krfblog;\n\n-- Flashback recovery area usage\nSELECT FILE_TYPE,\n       PERCENT_SPACE_USED,\n       PERCENT_SPACE_USED * p.value \/ 100 \/ 1024 \/ 1024 \"Mb used\",\n       PERCENT_SPACE_RECLAIMABLE,\n       NUMBER_OF_FILES,\n       PERCENT_SPACE_RECLAIMABLE * p.value \/ 100 \/ 1024 \/ 1024 \"Mb reclaimable\"\nFROM v$flash_recovery_area_usage f, v$parameter p\nWHERE p.name = 'db_recovery_file_dest_size';\n\n-- Restore point information\nCOLUMN time FORMAT A30\nCOLUMN name FORMAT A20\nSELECT SCN,\n       GUARANTEE_FLASHBACK_DATABASE,\n       STORAGE_SIZE,\n       TIME,\n       NAME\nFROM v$restore_point;\n\n-- Recovery area usage\nSELECT file_type,\n       percent_space_used AS used,\n       percent_space_reclaimable AS reclaimable,\n       number_of_files AS \"number\"\nFROM v$recovery_area_usage;\n\n-- Recovery file destination information\nSELECT name,\n       space_limit AS Total_size,\n       space_used AS Used,\n       SPACE_RECLAIMABLE AS reclaimable,\n       NUMBER_OF_FILES AS \"number\"\nFROM V$RECOVERY_FILE_DEST;\n\nSELECT * FROM v$flash_recovery_area_usage;\n\nSET MARKUP HTML OFF\nSPOOL OFF\nEXIT;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Sample Output (HTML Format)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Recovery-Related Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Parameter Name<\/th><th>Value<\/th><\/tr><\/thead><tbody><tr><td>db_recovery_file_dest<\/td><td>\/u01\/app\/oracle\/flash_recovery_area<\/td><\/tr><tr><td>db_recovery_file_dest_size<\/td><td>50G<\/td><\/tr><tr><td>db_flashback_retention_target<\/td><td>1440<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Flashback Log Information<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From V$FLASHBACK_DATABASE_LOGFILE:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>RECOVERY_DEST<\/th><th>NAME<\/th><th>STATUS<\/th><th>BYTES<\/th><\/tr><\/thead><tbody><tr><td>FRA<\/td><td>\/u01\/app\/oracle\/flashback1.log<\/td><td>ACTIVE<\/td><td>209715200<\/td><\/tr><tr><td>FRA<\/td><td>\/u01\/app\/oracle\/flashback2.log<\/td><td>INACTIVE<\/td><td>157286400<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From V$FLASHBACK_DATABASE_STAT:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>BEGIN_TIME<\/th><th>END_TIME<\/th><th>FLASHBACK_DATA<\/th><th>DB_DATA<\/th><th>REDO_DATA<\/th><th>ESTIMATED_FLASHBACK_SIZE<\/th><\/tr><\/thead><tbody><tr><td>01\/21\/25 12:00:00<\/td><td>01\/21\/25 12:59:59<\/td><td>1024 MB<\/td><td>512 MB<\/td><td>256 MB<\/td><td>2048 MB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From V$FLASHBACK_DATABASE_LOG:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>BEGIN_TIME<\/th><th>OLDEST_FLASHBACK_SCN<\/th><th>OLDEST_FLASHBACK_TIME<\/th><th>FLASHBACK_SIZE<\/th><\/tr><\/thead><tbody><tr><td>01\/21\/25 12:00:00<\/td><td>123456789<\/td><td>01\/21\/25 11:50:00<\/td><td>512 MB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Flashback Recovery Area Usage<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From v$flash_recovery_area_usage:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>File Type<\/th><th>Space Used (%)<\/th><th>Space Used (MB)<\/th><th>Space Reclaimable (%)<\/th><th>Space Reclaimable (MB)<\/th><th>Number of Files<\/th><\/tr><\/thead><tbody><tr><td>Flashback Logs<\/td><td>25<\/td><td>125<\/td><td>10<\/td><td>50<\/td><td>2<\/td><\/tr><tr><td>Archive Logs<\/td><td>20<\/td><td>100<\/td><td>5<\/td><td>25<\/td><td>3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Restore Point Information<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From v$restore_point:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>SCN<\/th><th>Guarantee Flashback<\/th><th>Storage Size (MB)<\/th><th>Time<\/th><th>Name<\/th><\/tr><\/thead><tbody><tr><td>1234567<\/td><td>Yes<\/td><td>30<\/td><td>01\/21\/25 15:30:00<\/td><td>PRE_UPDATE<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Recovery Area Usage<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From v$recovery_area_usage:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>File Type<\/th><th>Space Used (%)<\/th><th>Space Reclaimable (%)<\/th><th>Number of Files<\/th><\/tr><\/thead><tbody><tr><td>Flashback Logs<\/td><td>50<\/td><td>20<\/td><td>5<\/td><\/tr><tr><td>Archive Logs<\/td><td>30<\/td><td>10<\/td><td>3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Recovery File Destination Information<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>From V$RECOVERY_FILE_DEST:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Name<\/th><th>Total Size (MB)<\/th><th>Space Used (MB)<\/th><th>Space Reclaimable (MB)<\/th><th>Number of Files<\/th><\/tr><\/thead><tbody><tr><td>\/u01\/app\/oracle\/flash_recovery_area<\/td><td>51200<\/td><td>25600<\/td><td>10240<\/td><td>8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is an example of how the output would appear for each section. The actual data will depend on the state of your Oracle database and recovery settings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Flashback recovery is an essential feature in Oracle databases, allowing users to recover data quickly and efficiently. This guide provides a step-by-step explanation of how to retrieve complete flashback recovery information in Oracle, with tips for adjusting paths according to your system setup. Purpose of Flashback Recovery Oracle&#8217;s flashback recovery offers: How to Retrieve Flashback [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-2477","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/2477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=2477"}],"version-history":[{"count":3,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/2477\/revisions"}],"predecessor-version":[{"id":2496,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/2477\/revisions\/2496"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=2477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=2477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=2477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}