This discussion is archived
12 Replies Latest reply: Aug 12, 2012 9:14 PM by rp0428 RSS

Why flashback database to guaranteed restore point needs archivelog?

856121 Newbie
Currently Being Moderated
Could you please briefly explain?
  • 1. Re: Why flashback database to guaranteed restore point needs archivelog?
    820016 Newbie
    Currently Being Moderated
    Could you please briefly explain?
    Its a requirement and it is similar to Database point-in time recovery and flashback database is faster than the conventional method.

    Please check the link below for better understanding.

    http://download.oracle.com/docs/cd/E18283_01/backup.112/e10642/flashdb.htm

    -Anantha
  • 2. Re: Why flashback database to guaranteed restore point needs archivelog?
    856121 Newbie
    Currently Being Moderated
    Please, could you be more specific?
    what exactly?

    with point-in-time recovery we use redo to roll forward database in some moment in future.
    How it used with flashback?
  • 3. Re: Why flashback database to guaranteed restore point needs archivelog?
    820016 Newbie
    Currently Being Moderated
    Please, could you be more specific?
    what exactly?
    with point-in-time recovery we use redo to roll forward database in some moment in future.
    How it used with flashback?
    What do you do in case of point-in-time recovery?

    - In this case, you restore a whole database backup and then apply redo logs or incremental backups to re-create all changes up to a point in time. This works at the physical level to return the datafiles to their state at a target time in the past.

    You need to have flash recovery area configured. During normal operation, the database periodically writes old images of datafile blocks to the flashback logs. Flashback logs are written sequentially and often in bulk. In some respects, flashback logging is like a continuous backup. The database automatically creates, deletes, and resizes flashback logs in the recovery area. Flashback logs are not archived. You need only be aware of flashback logs for monitoring performance and determining disk space allocation for the recovery area.

    When you perform a Flashback Database operation, the database uses flashback logs to access past versions of data blocks and also uses some data in the archived redo logs. Consequently, you cannot enable Flashback Database after a failure is discovered and then use Flashback Database to rewind through this failure. Note that you can use the related capability of guaranteed restore points to protect the contents of your database at a fixed point in time, such as immediately before a risky database change.

    http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmflash.htm

    HTH
    -Anantha
  • 4. Re: Why flashback database to guaranteed restore point needs archivelog?
    856121 Newbie
    Currently Being Moderated
    Unfortunately, the question is still exists.

    There is guaranteed restore point and flashback logs. I do flashback. Oracle get old images of blocks from flashback logs and apply it to datafiles, right?

    What exactly Oracle can requires from an archive log?
  • 5. Re: Why flashback database to guaranteed restore point needs archivelog?
    UweHesse Expert
    Currently Being Moderated
    Flashback Logs contain old versions of Oracle Blocks. But not every Block Modifications leads to the generation of Flashback Logs. Therefore, if you do a flashback database operation, you will never reach exactly the point in time in the past with flashback logs only. You 'grow your datafiles older' than the point in time you want to reach (very much faster than a complete restore from backup would achieve the same). The rest is then recovered with Redo Protocol from Archivelogs or Online Logs. Basically, flashback database does 2 steps under the cover:

    1) make datafiles sufficiently old with old blocks from flashback logs
    2) recover with redo protocol to the exact point in time you want to get to

    Kind regards
    Uwe Hesse

    http://uhesse.wordpress.com
  • 6. Re: Why flashback database to guaranteed restore point needs archivelog?
    820016 Newbie
    Currently Being Moderated
    There is guaranteed restore point and flashback logs. I do flashback. Oracle get old images of blocks from flashback logs and apply it to datafiles, right?
    What exactly Oracle can requires from an archive log?
    The blocks were used to reconstruct the data file contents. When you flashback database to a prior time, the blocks changed after target time will be restored from the flashback logs. then, it uses archive logs to reapply changes that were made after these blocks were written to flashback logs.

    -Anantha
  • 7. Re: Why flashback database to guaranteed restore point needs archivelog?
    856121 Newbie
    Currently Being Moderated
    Why these changes exist is in redo logs but not exist in flashback logs?
    Because flashback logs wrote periodically?

    Also it is not quite picture... Why it is needed with guaranteed restore point?
    We need blocks on some exact SCN. It does not have images of blocks on time before this SCN and does not need to roll forward it to SCN of restore point.
  • 8. Re: Why flashback database to guaranteed restore point needs archivelog?
    jgarry Guru
    Currently Being Moderated
    Why these changes exist is in redo logs but not exist in flashback logs?
    Because it would be redundant. Flashback logs are the data needed to flashback without doing a restore, but transactions need recovery. Recovery needs redo. Redo was developed long before flashback.
  • 9. Re: Why flashback database to guaranteed restore point needs archivelog?
    user12155855 Newbie
    Currently Being Moderated
    but transactions need recovery. Recovery needs redo<
    Wrong.
    Transaction recovery needs undo only.
  • 10. Re: Why flashback database to guaranteed restore point needs archivelog?
    user11960835 Newbie
    Currently Being Moderated
    Hi,

    I am in a similar situation, trying to understand the relation between archive logs and flashback logs. Going through the documentation did nit make it clear to me, so posting my question here.

    DB version - 11gR2

    Consider this scenario
    1. Important DDL and DML changes made to the database on 1/1/2012 10 AM
    2. Archive logs created for changes
    3. created a guaranteed restore point - GFBP1 on 1/1/2012 at 11 AM
    4. database goes through changes and transactions take place - creates archive logs
    5. flashback to GFBP1 guaranteed restore point on 1/2/2012 11 AM

    Questions:

    1. What archive logs are required here in this scenario?
    2. What exactly happens in the background when you create a guaranteed restore point?
    3. Are the flashback log files created for GFBP1 guaranteed restore point be sufficient to flashback the database?
    4. Can I delete the archive logs until 1/1/2012 11 AM at 1/1/2012 11:30 AM because I have a guaranteed restore point?

    I would appreciate your reply.
  • 11. Re: Why flashback database to guaranteed restore point needs archivelog?
    sb92075 Guru
    Currently Being Moderated
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

    You should start your own thread & NOT hijack a thread started by somebody else.
    trying to understand the relation between archive logs and flashback logs.
    What are flashback logs? post URL where they are documented.
  • 12. Re: Why flashback database to guaranteed restore point needs archivelog?
    rp0428 Guru
    Currently Being Moderated
    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/flashdb.htm

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points