• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Create and Drop Guaranteed restore point in Oracle Data Guard

by admin

This post describes the steps necessary to create, use and drop a Guaranteed restore point in a Data Guard configuration. For the purposes of this post, the following fictitious environment is used as an example to describe the procedure:

Primary database: chicago
Standby database: boston

Create Guaranteed Restore Point

1. Stop redo transport and redo apply

a) If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='defer';

Here, replace n with the corresponding number for remote destinations.

On standby database:

SQL> alter database recover managed standby database cancel;

b) If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-OFF';
DGMGRL> edit database boston set state = 'APPLY-OFF';

2. Set GRP in standby database.

On standby database:

SQL> CREATE RESTORE POINT grp_dg GUARANTEE FLASHBACK DATABASE;

3. Set GRP in primary database.

On primary database:

SQL> CREATE RESTORE POINT grp_dg GUARANTEE FLASHBACK DATABASE;

4. Enable redo transport and redo apply.

a) If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='enable';

Here, replace n with the corresponding number for remote destinations.

On standby database:

SQL> alter database recover managed standby database using current logfile disconnect;

b) If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-ON';
DGMGRL> edit database boston set state = 'APPLY-ON';

Flashback Database to Guaranteed Restore Point

1. Stop redo transport and redo apply.

a) If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='defer';

Here, replace n with the corresponding number for remote destinations.

On standby database:

SQL> alter database recover managed standby database cancel;

b) If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-OFF';
DGMGRL> edit database boston set state = 'APPLY-OFF';

2. Shutdown Primary Database and start one instance in mount stage.

3. Flashback primary database to restore point.

On primary database:

SQL> flashback database to RESTORE POINT grp_dg;
SQL> alter database open resetlogs;

4. Shutdown Standby database and start one instance in mount stage.

5. Flashback standby database.

On standby database:

SQL> flashback database to RESTORE POINT grp_dg;

6. Enable redo transport and redo apply.

a) If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='enable';

Here, replace n with the corresponding number for remote destinations.

On standby database:

SQL> alter database recover managed standby database using current logfile disconnect;

b) If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-ON';
DGMGRL> edit database boston set state = 'APPLY-ON';

7. If Active Data Guard licence is used, open read only the standby database.

Drop Guaranteed Restore Point

1. Stop redo transport and redo apply.

a) If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='defer';

Here, replace n with the corresponding number for remote destinations.

On standby database:

SQL> alter database recover managed standby database cancel;

b) If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-OFF';
DGMGRL> edit database boston set state = 'APPLY-OFF';

2. Drop GRP in primary database.

On primary database:

SQL> drop RESTORE POINT grp_dg;

3. Drop GRP in standby database.

Ensure the standby database is in mount stage and drop GRP:

SQL> drop restore point grp_dg;

If Active Data Guard licence is used, open read only the standby database after dropping the GRP.

4. Enable redo transport and redo apply

a) If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='enable';

Here, replace n with the corresponding number for remote destinations.

On standby database:

SQL> alter database recover managed standby database using current logfile disconnect;

b) If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-ON';
DGMGRL> edit database boston set state = 'APPLY-ON';

Filed Under: Data Guard, oracle

Some more articles you might also be interested in …

  1. How to set EVENTS in spfile
  2. How to Drop/Truncate Multiple Partitions in Oracle 12C
  3. How to Migrate ASM Disk Groups to another Storage Online [non ASMLIB Devices]
  4. ORA-39170: Schema expression ‘OPS’ does not correspond to any schemas
  5. How To Create An ASM Diskgroup Using XML code in ASMCMD
  6. How to Enable Fast-Start Failover using Enterprise Manager
  7. How to startup an Oracle Database Instance using spfile or pfile(init.ora) parameter file
  8. How to Clone PDB With Oracle Key Vault (OKV)
  9. How To Add New Disk to An Existing Diskgroup on RAC Cluster or Standalone ASM Configuration
  10. Oracle Database 12.2 RMAN Cross Platform Tablespace Transport Over Network

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright