Link to home
Start Free TrialLog in
Avatar of marrowyung
marrowyung

asked on

Oracle flashback and restore

hi,

what is the difference between flashback and restore in oracle ? flashback is faster is it read the old data in memory  ?
Avatar of Sam Simon Nasser
Sam Simon Nasser
Flag of Palestine, State of image

The main difference is that flashback rolls back changes including the changes made by others in the whole table or database to any point of time in the past within the range of flashback setting. To roll back to restored points will only rollback what you change in your transaction, and changes by others won't be affected.

more explained here (flashback vs recovery)
http://www.dba-oracle.com/t_callan_oracle_database_flashback_vs_recovery.htm
Avatar of marrowyung
marrowyung

ASKER

flashback restore everything including other users, restore only restore my own change ?
I think Sam sort of mixed up flashback and savepoints.  You can rollback to a savepoint for a transaction.  Flashback spans transactions.


What flashback are you most interested in?  There are a few different things you can do:  Flashback Query, Table and Database.

Query lets you query a table based on how it looked at a previous point in time.  There is a limited window to do this.  It relies on UNDO to look at previous values.

Flashback table just restores a table to a previous time.  You have the option t restore it to a new table name.

Flashback database, well, the entire database.

The previously mentioned Restore Point is basically a way to name a specific SCN.


Restore pulls necessary files from backups.  That is pretty much it.  Recovery is what brings the database back to a specific point in time.


Flashback database and Recovery are more or less the same thing.  It takes a database back to a point in time.
"Flashback database and Recovery are more or less the same thing."

I think flashback is restore from flashback cache area in Oracle, which can be very fast! backup need to load file from disk or tape, so much slower ?

"Restore pulls necessary files from backups."

flashback don't pull file from backup you mean ?

"What flashback are you most interested in?  "

as I am reading RMAN, I keep seeing restore + recovery and flashback, i want to clean up what it means... must be diff.
>>I think flashback is restore from flashback cache area in Oracle, which can be very fast! backup need to load file from disk or tape, so much slower ?

Assuming "flashback database":  That doesn't mean that they aren't basically the same thing.  They both bring a database to a specific point in time.

As far as speed goes, it depends.  FLashback database CAN pull from backups if it needs an archived redo log that is no longer on disk.  It can also be slower depending on how much data needs to be rolled back.

Flashback database rolls back all committed transactions in revers order back to a point in time.  If it has a LOT of transactions, that can be slower.

>>i want to clean up what it means... must be diff.

Again, assuming flashback database:  They both to the same thing but use different methods to achieve it.
":Flashback database rolls back all committed transactions in revers order back to a point in time.  If it has a LOT of transactions, that can be slower.:

and restore and recovery is NOT the same and go though other process?

there mush be sth different.

"They both to the same thing but use different methods to achieve "
what is the diff ?
A restore and recovery is more for disaster recovery.  Flashback database is more for a development and test baseline.  Can you do a restore for baselines, yes.

Flashback cannot rebuild a database from a lost data file or other disaster.


As far as them being the same:  Think about taking a trip cross country:  You can walk, ride a bike, drive a car or fly.  No matter what path you take, the end result is the same.  Same with Flashback database and recovery:  The end result is the same.  Just different methods to get there.
" Flashback database is more for a development and test baseline.  Can you do a restore for baselines, yes."

seems flashback is more on restore configuration but not data? or just a small data set?
>>seems flashback is more on restore configuration but not data? or just a small data set?

Flashback database is everything in the database.  Most configuration is in the spfile and is outside the database so, it isn't flashed back.
Hi,

But you said "Flashback cannot rebuild a database from a lost data file or other disaster.", bit you said:

Flashback database is everything in the database.  

I am not sure what is included in flashback and what is not!
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"Flashback takes all the objects/tables and data back to a previous point in time.  It will not recover a lost data file.
"

is that mean we need to use restore +recovery first and then Flashback to fully recover everything ?

so diff is restore is more on physical repair and flashback is more on logical repair ?
>>is that mean we need to use restore +recovery first and then Flashback to fully recover everything ?

No.  restore+recovery brings you back to a point in time and makes the database operational.

>>so diff is restore is more on physical repair and flashback is more on logical repair ?

More or less.  BUT you can still restore/recover without any physical damage.  Flashback needs enabled before it can be used.  It might not be an option if you need to roll back an entire database.
"It might not be an option if you need to roll back an entire database."

I understood this, tks.

"No.  restore+recovery brings you back to a point in time and makes the database operational."

flashback can't do PITR ?
>>flashback can't do PITR ?

I have already covered this.  YES, both perform a PITR.  You asked if you must do a recovery and a flashback.  I was pointing out that recovery ALSO does a PITR so no need to flashback.
yeah! tks.

so it is restore + recover / flashback.