Dataguard: preventing logical standby to loose track after flashback database on primary

dba.stackexchange https://dba.stackexchange.com/questions/140329

  •  02-10-2020
  •  | 
  •  

Question

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:

  1. Stop SQL Apply on logical standby
  2. Create restore point on primary
  3. Do stuff on primary, error occurs
  4. Flashback primary database to restore point
  5. Open primary database
  6. 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?

Was it helpful?

Solution 2

Final situation that works is:

  1. Stop SQL Apply on logical standby
  2. Create restore point on standby
  3. Create restore point on primary
  4. Do stuff on primary, error occurs
  5. Flashback primary database to restore point
  6. Flashback logical to restore point
  7. Open primary database
  8. Start SQL Apply on logical standby

Thanks all for your input.

OTHER TIPS

I would change the whole process of deploying.

  1. Stop SQL Apply.
  2. Create restore point on standby.
  3. Deploy to standby
  4. When testing is complete, flashback standby.
  5. Start SQL Apply.
  6. Safe to deploy on primary.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top