The following is the step-by-step process of Flashback of RAC database to a Restore Point.
1) Set the environment to correct instance.
ps -ef | grep pmon
. oraenv
2) Get restore point name and make note of it from sqlplus.
SQL> select name, host_name, status from gv$instance;
SQL> select log_mode,flashback_on from v$database;
SQL> select name,time from v$restore_point;
3) Stop the database and put it in mount state using srvctl
srvctl status database -d MYTESTDB
srvctl stop database -d MYTESTDB
srvctl status database -d MYTESTDB
srvctl start instance -d MYTESTDB -i MYTESTDB1 -o mount
4) Flashback to restore point using sqlplus
SQL> select instance_name,status from gv$instance;
SQL> flashback database to restore point REST_POINT;
SQL> alter database open resetlogs;
Database altered.
5) Stop and start the database and make sure all instances are up, using srvctl.
srvctl stop database -d MYTESTDB
srvctl start database -d MYTESTDB
srvctl status database -d MYTESTDB
I hope this is helpful!
2 Comments. Leave new
The steps are very straightforward, thank you very much.
I have a doubt related to the standby database.
If the database that I am doing the flashback has a standby want should be done.
Recreate the standby or there are steps to flashback the standby as well.
Thank you.
Hi Jordao,
you don’t need to rebuild the standby, once you restore primary from flashback in mount state and open it with resetlogs, before that you have to stop MRP for the Standby.
1. get the resetlogs_change# from v$database; —Primary
2. bring the standby database in mount state.
3. flashback database to scn Number(resetlogs_change#) which you got from Primary
Note: if resetlogs_change# number is 250 you have use in standby 2 or 3 number less to it(something like 247).
4. bring all instances related to Standby and start replication or mrp on standby.
I hope this will help you.
Regards,
Srikanth