Home » RDBMS Server » Backup & Recovery » Flashback database question
Flashback database question [message #448463] Tue, 23 March 2010 10:28 Go to next message
finkus55
Messages: 3
Registered: March 2010
Junior Member
Hi All,

I am new to the forum and had a general question about the FLASHBACK DATABASE feature. When you use the FLASHBACK DATABASE command, does it generate redo?

For example, lets say you do the following:

1) Take a backup of tablespace TEST
2) Update some data in the tablespace TEST
3) FLASHBACK DATABASE to some point before step #2
4) Instance failure

At this point I want complete recovery, so I restore the original backup in step 1 and begin recovery rolling forward using my archived and online redo logs. I am assuming that within these logs something is written about the blocks that were changed in the FLASHBACK DATABASE? Hopefully this was a clear example....

Thanks for helping me understand this point!

Chris
Re: Flashback database question [message #448475 is a reply to message #448463] Tue, 23 March 2010 11:54 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
When you use the FLASHBACK DATABASE command, does it generate redo?

Of course not, otherwise it could not work.

The answer of your question depends on what you do between 3 and 4.
If you opened the database then you did with "reset logs" option and then you recover until the next steps after your open but the update never existed for this database.
If you didn't then you can recover until what you want, before or after the the update.

Regards
Michel
Re: Flashback database question [message #448489 is a reply to message #448463] Tue, 23 March 2010 12:34 Go to previous messageGo to next message
finkus55
Messages: 3
Registered: March 2010
Junior Member
Hi Michel,

Thank you for the reply. I am still a bit confused and maybe it was because my scenario was a little bit off. Let's try this....

1) Take a backup of tablespace HR
2) Update some data in the EMPLOYEES table
3) FLASHBACK DATABASE to some point before step #2.
4) Update some data in the SALARY table
5) Datafile corruption for tablespace HR, need to perform restore/recovery.

So after step 5 I restore the backup from Step 1 and perform recovery. How does Oracle know to not apply the redo generated by step 2 and only apply the redo from step 4, it would have to somehow know that a flashback database occurred and the redo from step 2 is no longer valid, no?

Chris
Re: Flashback database question [message #448490 is a reply to message #448489] Tue, 23 March 2010 12:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It does not apply the redo log for step 2. They never existed for it as you flashback before step 2.
Before step 4 you open with reset logs, so what happened in step 2 is erased for ever.
The database acts if there were only steps 1 and 4.

Regards
Michel


Re: Flashback database question [message #448493 is a reply to message #448463] Tue, 23 March 2010 13:18 Go to previous message
finkus55
Messages: 3
Registered: March 2010
Junior Member
Ahhhhhh ok, makes sense now. I should've re-read your previous post about the resetlogs after the RECOVER DATABASE. Thanks for your help and patience!
Previous Topic: flashback table to before drop;
Next Topic: How can we open the database when we do not have pfile, spfile, control file and backup.
Goto Forum:
  


Current Time: Fri Mar 29 05:56:53 CDT 2024