RMAN Backups with Guaranteed Restore Point – Oracle Database 19c

Guaranteed Restore Points (GRPs) are a powerful feature in Oracle Database that provides a safety net for database administrators. By creating a GRP, you ensure that the database can be restored to a specific point in time, even if flashback logging is disabled. This is invaluable for disaster recovery and error correction. Recently I came across a question where customer has a situation. Database has guaranteed restore point(GRP) on the database and now they have taken FULL RMAN backup. They want to know if they restore this RMAN backup, can they fallback till GRP. This post is about understanding the Impact of RMAN Backups with Guaranteed Restore Points.

The answer to above question is NO because If the database control file is restored from backup or re-created, all accumulated flashback log information is discarded. You cannot use FLASHBACK DATABASE to return to a point in time before the restore or re-creation of a control file.

Below example explains this scenario. Here I have created GRP and taken full RMAN backup.


SQL> select name,open_mode from v$database;

NAME	  OPEN_MODE
--------- --------------------
ORADB	  READ WRITE


SQL> create restore point G_RESTORE_POINT_29_JUL_24 guarantee flashback database;

Restore point created.

SQL> select name,GUARANTEE_FLASHBACK_DATABASE from v$restore_point;

NAME						GUA
----------------------------------- ------------
G_RESTORE_POINT_29_JUL_24	YES


RMAN> backup database plus archivelog;


Starting backup at 29-JUL-2024 20:55:21
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=408 device type=DISK
.
.
.
piece handle=/u01/app/oracle/fra/ORADB/AE5BC6F18492329DE0537C01A8C037AC/backupset/2024_07_29/o1_mf_nnndf_TAG20240729T205521_mbhldcn7_.bkp tag=TAG20240729T205521 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 29-JUL-2024 20:55:42

Starting Control File and SPFILE Autobackup at 29-JUL-2024 20:55:42
piece handle=/u01/app/oracle/fra/ORADB/autobackup/2024_07_29/o1_mf_s_1175633503_mbhldgs7_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 29-JUL-2024 20:55:43

RMAN> 

Now restoring the database and we will check what will happen to GRP.

[oracle@srv1 rman_backup]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Mon Jul 29 21:10:46 2024
Version 19.8.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORADB (not mounted)

RMAN> 

RMAN> Restore controlfile from autobackup;

Starting restore at 29-JUL-2024 21:11:03
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK

recovery area destination: /u01/app/oracle/fra
database name (or database unique name) used for search: ORADB
channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/fra/ORADB/autobackup/2024_07_29/o1_mf_s_1175633503_mbhldgs7_.bkp found in the recovery area
AUTOBACKUP search with format "%F" not attempted because DBID was not set
channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/fra/ORADB/autobackup/2024_07_29/o1_mf_s_1175633503_mbhldgs7_.bkp
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/app/oracle/oradata/ORADB/control01.ctl
output file name=/u01/app/oracle/fra/ORADB/control02.ctl
Finished restore at 29-JUL-2024 21:11:05

RMAN> 
RMAN> sql 'alter database mount';

sql statement: alter database mount
released channel: ORA_DISK_1

RMAN> select name,GUARANTEE_FLASHBACK_DATABASE from v$restore_point;

no rows selected

RMAN> 

RMAN> exit  

Recovery Manager complete.
[oracle@srv1 rman_backup]$ 

So upon restoring the control file from RMAN backup, guaranteed restore point (GRP) is discarded. Thanks for reading.

Reference: https://docs.oracle.com/en/database/oracle/oracle-database/19/bradv/using-flasback-database-restore-points.html#GUID-28EB12CA-6E98-4ED4-A798-1326E4A938AB

Leave a Comment