Forum Stats

  • 3,824,779 Users
  • 2,260,417 Discussions


Oracle Flashback, restore to restore point after full backup

User_N3CA2 Member Posts: 21 Red Ribbon
edited Jan 8, 2020 2:34PM in Recovery Manager (RMAN)

I'm playing around with Oracle flashback database. I noticed that after performing a full db backup, it is not possible to restore to a previously set restore point, is this correct? Or am I missing a setting or configuration?




  • Dude!
    Dude! Member Posts: 22,829 Black Diamond
    edited Jan 8, 2020 2:34PM

    Flashback database and guaranteed restore points, to rewind the database to a previous point in time, require flashback logs, as well as redo logs (archivelogs). Restore points however do not require to enable Flashback Database.

    Depending on your RMAN restore and recovery, you may have to open the database with RESETLOGS, hence all changes to the database after the target SCN for FLASHBACK DATABASE are abandoned. You can use "Flashback Database To Before Resetlogs"; provided you have all the flashback and archivelogs still available, or use a guaranteed restore points, if available.

    For example:

    RMAN> select scn, name, database_incarnation# from v$restore_point;

       7170288  GRP1  2

    RMAN> list incarnation;

    List of Database Incarnations

    DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

    ------- ------- -------- ---------------- --- ---------- ----------

    1       1       ORCL     1540763739       PARENT  1          17-APR-19

    2       2       ORCL     1540763739       PARENT  1920977    07-JUL-19

    3       3       ORCL     1540763739       CURRENT 7170665    08-JAN-20

    RMAN> startup force mount

    RMAN> flashback database to restore point GRP1;

    Starting flashback at 08-JAN-20

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID=438 device type=DISK

    starting media recovery

    archived log for thread 1 with sequence 70 is already on disk as file /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2020_01_08/o1_mf_1_70_h1dbnvjs_.arc

    media recovery complete, elapsed time: 00:00:01

    Finished flashback at 08-JAN-20

    If this doesn't answer your question, please post your exact database version and show the error message. Actually you should always do to avoid the odds.