[The Oracle Maintenance Engineer's Notebook series] Why do you need flashback log and archive log when flashback?

Source: Internet
Author: User

Why do you need flashback log and archive log when flashback?

If the activity of the database is not very frequent, you can see that its flashback log is relatively small. So what is the way to flashback to the past?

The schematic is as follows:

12:50 change data for the first time (100-->200)

1:00 Flashback Log write for the first time. Record content is before the change data: 100

1:10 Second change data (200-->300)

1:30 proceed to the next flashback log write. Record content is before the change data: 200

1:45 Third change data (300-->400)

2:00 proceed to the next flashback log write. Record content is before the change data: 300

2:20 fourth time change data (400-->500)

2:30 proceed to the next flashback log write. Record content is before the change data: 400

2:40 Fifth time change data (500-->600)

3:00 proceed to the next flashback log write. Record content is before the change data: 500

If you want to flashback to 1:15 hours,

The database needs to first find the moment of the flashback log closest to the point in time.

That is, 1:00 is the content of the flashback, use this content to cover the current data, and then the 1:00 to 1:15 of the contents of archive log apply this data.

The above example is a data block change, the database run in a number of data blocks are changed at different times. So the real flashback is a process like this:

For example now is 3:10 points, want to go back to 1:15 time, then go through the following process:

First use 3:00 of the flashback, with the data before the change, back to 3:00 of the state of the moment.

Then use 2:30 of the flashback, with the data before the change, back to the state of the 2:30 moment.

Then use 2:00 of the flashback, with the data before the change, back to the state of the 2:00 moment.

Then use 1:30 of the flashback, with the data before the change, back to the state of the 1:30 moment.

Then use 1:00 of the flashback, with the data before the change, back to the state of the 1:00 moment.

Then, using the archive log content from 1:00 to 1:15, apply to the 1:15-moment state.

[Oracle Maintenance Engineer's Notebook series] Why do you need flashback log and archive log when flashback?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.