Dataguard: preventing logical standby to loose track after flashback database on primary We have 2 Oracle databases; a primary and a logical standby, configured with Dataguard. Whenever we have an application rollout on the primary, we create a restore point in case anything goes wrong.

Last Tuesday something went wrong and we had to restore the primary database to its restore point.

That caused the logical standby database to stop applying archive logs (which makes sense, because the primary database was basically reverted in time, leaving the logical standby in an undefined state).

How could we have prevented this situation?

I imagine this scenario:


Stop SQL Apply on logical standby
Create restore point on primary
Do stuff on primary, error occurs
Flashback primary database to restore point
Open primary database
Start SQL Apply on logical standby


Would this work? Would it allow the logical standby to continue applying without getting diverged from the primary database?
I would change the whole process of deploying. 


Stop SQL Apply.
Create restore point on standby.
Deploy to standby
When testing is complete, flashback standby.
Start SQL Apply.
Safe to deploy on primary.