- issue command to set restore point:
CREATE RESTORE POINT before_patch GUARANTEE FLASHBACK DATABASE;
- apply application patch
- test system after patch
- if ok, release restore point:
DROP RESTORE POINT before_patch;
- if something go wrong, flashback to restore point:
SHUTDOWN DATABASE; STARTUP MOUNT; FLASHBACK DATABASE TO RESTORE POINT before_patch;
Moreover you can use Restore Point while upgrading database 10g R1 to 10g R2. It can be very time saving in case of failure during upgrade process.
Restore Points can be also usefull in application testing process. You can define restore point, run test procedures, save results, restore to to saveponit and test again ...
To check if that you have set restore point you can run query:
select * from v$restore_point;Hope you will find it useful,
Cheers, Paweł
Related articles:
4 comments:
Rememnber to set compatibility. otherwise you get:
ORA-38784: Cannot create restore point 'SERVIS'.
ORA-24081: compatible parameter needs to be 10.2.0.0.0 or greater
Question.
How do you propose to use a restore point while upgrading from 10g R1 to 10g R2 when restore points are a feature introduced in 10g R2??
Would you do a "mount upgrade" using the 10.2 binaries and create a restore point right away?
What I would do:
1. before installing 10gR2 binaries i would setup flashback mode for database
2. install 10gR2 binaries
3. startup upgrade
4. set compatibility to 10.2
5. set restore point
6. run upgrade script.
I must say that I did not test it in practice, but it should work. Also this document by Lawrence To, Joe Meeks and Jeffrey McCormick confirm that.
This is a very interesting feature, but in my opinion the cases of usages is restricted to some limitations. Firts of all the database where the application resides must be the only one on the database, otherwise after if after patch something goes wrong and a restore point is necessary, the other applications will be affected (what if some new data on other applications has been inserted during application patch?). In addition to run those commands it is probably necessary to have DBA privileges, and it is not common to be a developer with those privileges. However it is very interesting indeed. Thanks. Bizzo
Post a Comment