How to create flashback restore point on database?
If the database is up, shutdown the database and restart the database in mount mode.
Check whether the flashback is on, If the flashback is not on then enable the flashback. Note: If you are using RAC then before enabling flashback make sure all other instances are shutdown
If you executed the flashback on command without shutting down the other instances, you will receive the below error
ERROR at line 1:
ORA-38777: database must not be started in any other instance.
Solution is to make sure all other instances are down.
After enabling the flashback, check the status to make sure the flashback is enabled on the database.
And check the DB_FLASHBACK_RETENTION_TARGET. By default it is 1440 which is one day. If you want for “n” no of days then the formula is 1440*n=value. For example if you want to retain for 3 days then 1440*3=4320
Alter the database to set the retention to 3 days.
ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320;
And then create the restore point as below
CREATE RESTORE POINT before_my_change;
No comments:
Post a Comment