Flashback database

Redo logs on disk or tape must be available for the entire time period spanned by the flashback logs. For example, if the flashback retention target is 1 week, then you must ensure that online and archived redo logs that contain all changes for the past week are accessible. In practice, redo logs are typically needed much longer than the flashback retention target to support point-in-time recovery.

Set the environment to correct instance

ps -ef | grep pmon
. oraenv

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;

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

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.

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