ORA-00313: Open Failed for Members of Log group in Physical Standby

The scenario is we have an Oracle Dataguard Primary/Standby pair perfectly working (as far as we could see then) . We had need for a DR test which typically involves failover to the Standby. After failing over and reversing the log shipping we found that the logs were not being applied in the new standby. The apparent error in the alert log of the now Standby Database (formerly primary was:

ORA-00313: Open Failed for Members of Log group 5 Thread 1

First we noticed that the number of log groups in the new primary was actually three NOT five so one thought was something had gone wrong with the fourth and fifth log groups so we tried to recreate alas the error we received indicated that the log groups already existing thus confirming our fear since we could not see the log file groups in v$log:

ERROR at line 1:
ORA-01184: logfile group 4 already exists

We then dropped both log file groups 4 and 5 and recreated them on the primary. Note that clearing the log file groups on the primary did not solve the situation. We eventually cleared the affected logfile group on the standby database and we were able to get Dataguard working again after bouncing the standby database.

alter database clear logfile group 5;

I should also mention that you cannot manipulate online redo logs on the standby database.

Useful References

Bug 12575481 – Activating standby database with missing Online Redo Logs may fail with ORA-7445[ kcrcls] (Doc ID 12575481.8)

How to Recover from Loss Of Online Redo Log And ORA-312 And ORA-313 (Doc ID 117481.1)