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?