Flashback database enables us to get back our database to a prior time.
And with restore point we can make a point before any database upgrade and if there is any problem we can get back to that point.
Restore point can be two types.
1)Normal Restore point:
---------------------------
Creating a normal restore point assigns the restore point name to a specific point in time or SCN, as a kind of bookmark or alias you can use with commands that recognize a RESTORE POINT clause as a shorthand for specifying an SCN.
In normal restore point Flashback logs are deleted in response to space pressure.
To create a restore point simply use,
CREATE RESTORE POINT before_upgrade;
2)Guaranteed Restore Point:
-------------------------------
In guaranteed restore point Flashback logs are not deleted in response to space pressure, if they are required to satisfy the guarantee.
Guaranteed restore point can be created whether your flashback feature on or off.
If a guaranteed restore point is created when Flashback Database is disabled, then, the first time a datafile block is modified after the time of the guaranteed restore point, an image of the block before the modification is stored in the flashback logs but subsequent modifications to the same block do not cause the block contents to be logged again. In this case you cannot use FLASHBACK DATABASE to reach points in time between the guaranteed restore points and the current time.
If a guaranteed restore point is created when Flashback Database is enabled, then the database perform normal flashback operations and create logs. The flash recovery area always retains the flashback logs required to allow FLASHBACK DATABASE to any time as far back as the earliest
currently defined guaranteed restore point. In this case you can use FLASHBACK DATABASE to reach points in time between the guaranteed restore points and the current time.
To create a guaranteed restore point use,
CREATE RESTORE POINT before_upgrade GUARANTEE FLASHBACK DATABASE;
You can see your restore points from V$RESTORE_POINT.
To drop a restore point use
SQL> DROP RESTORE POINT before_app_upgrade;
No comments:
Post a Comment