Lin Hong's TECH Blog! 刀不磨要生锈,人不学习要落后 - Thinking ahead

Oracle 12c enable Flashback Database Tips

2019-03-12

Oracle 12c enable Flashback Database Tips

By Flashback Database, we can flashback the database to a previous point in time without media recovery (without restoring backup copies of the datafiles).

When the database is running, Flashback Database buffers and writes before-images of data blocks to flashback logs, which are generated by default for all permanent tablespaces and which reside in the fast recovery area (FRA).

Flashback logs allow Flashback Database to reduce the time to correct an error proportionally to the time it takes to detect the error, rather than to media recovery time (when Flashback Database is not enabled), which depends on database size.

Enable Flashback Database steps

  1. Set db to mount status

    shutdown immediate; startup mount;

  2. Set db into archivelog status

    alter database archivelog; archive log list;

  3. Set flashback retention target time(minutes)

    22460=2880 -> 48 hours alter system set db_flashback_retention_target=2800;

  4. Set recovery dest and size

    alter system set db_recovery_file_dest_size=20G; alter system set db_recovery_file_dest=’+FRA’;

  5. Set undo retention(second)/half of db_flashback_retention_target

246060 = 86400 -> 24 hours alter system set undo_retention-86400;

  1. Set flashback on alter database force logging; alter database flashback on; alter database open;

Some documents

Database Backup and Recovery User’s Guide

Have a good work&life! 2019/03 via LinHong


Similar Posts

Comments