DG: Flashback with DG

Before creating a restore point on a primary database, not to break the standby, a few things must be done in a certain order.

#1 Stop the apply on the standby. Otherwise the next step will fails with ORA-001153

edit database <primary> set state='TRANSPORT-OFF';
edit database <standby> set state='APPLY-OFF'; 

#2 Create a restore point on the standby

CREATE RESTORE POINT RP_STDBY GUARANTEE FLASHBACK DATABASE

#3 Create a restore point on the primary

CREATE RESTORE POINT RP_PRIMARY GUARANTEE FLASHBACK DATABASE

#4 Restart the the apply on the standby.

edit database <primary> set state=’TRANSPORT-ON’;
edit database <standby> set state=’APPLY-ON’;