Subscribe to continue reading
Become a paid subscriber to get access to the rest of this post and other exclusive content.
Become a paid subscriber to get access to the rest of this post and other exclusive content.
It is a good practice to create a guarantee restore point ( GRP ), before upgrading or patching databases.
Here is an example of how to create a guarantee restore point ( GRP ), and how to flashback the RAC database to this guarantee restore point ( GRP ).
SQL> set pagesize 120
SQL> set linesize 180
SQL> select LOG_MODE,FORCE_LOGGING,CURRENT_SCN,FLASHBACK_ON
from v$database;
LOG_MODE FORCE_LOGGING CURRENT_SCN FLASHBACK_ON
---------- ------------- ----------- ------------
ARCHIVELOG YES 6622166 NO
SQL> select * from v$restore_point; no rows selected SQL> create table before_patching ( id number, name varchar2(30)); Table created. SQL> create restore point BEFORE_PATCHING guarantee flashback database; Restore point created. SQL> create table after_GRP ( id number, name varchar2(30)); Table created. SQL> select * from v$restore_point; SCN DT GUA STORAGE_SIZE TIME REST NAME CON_ID -------- --- --- ------------ --------- ---- -------------- ------- 6623316 1 YES 4294967296 29-NOV-16 YES BEFORE_PATCHING 0
The rollback is required to flashback the database to guarantee restore point ( GRP ).
$ srvctl stop database -d RACTEST
$ srvctl start instance -d RACTEST -i RACTEST1 -o mount;
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> flashback database to restore point BEFORE_PATCHING;
Flashback complete.
SQL> alter database open resetlogs;
Database altered.
SQL> select LOG_MODE,FORCE_LOGGING,CURRENT_SCN,FLASHBACK_ON
from v$database;
LOG_MODE FORCE_LOGGING CURRENT_SCN FLASHBACK_ON
---------- ------------ ---------- -----------------
ARCHIVELOG YES 6625602 RESTORE POINT ONLY
SQL> select count(*) from before_patching;
COUNT(*)
----------
0
SQL> select count(*) from after_GRP; <---DB was flasged back to the correct point.
select count(*) from after_GRP
*
ERROR at line 1:
ORA-00942: table or view does not exist
$ srvctl stop database -d RACTEST $ srvctl start database -d RACTEST $ srvctl status database -d RACTEST Instance RACTEST1 is running on node racnode1 Instance RACTEST2 is running on node racnode2 Instance RACTEST3 is running on node racnode3 Instance RACTEST4 is running on node racnode4
SQL> drop restore point BEFORE_PATCHING; Restore point dropped. SQL> select * from v$restore_point; no rows selected