Tuesday, February 24, 2009

Logical Dataguard does not activate due to Login trigger

# Another interesting error. Logical dataguard failed to activate. Cause was found to be a login trigger which was not owned by SYS.

# In primary database alert log :-

Fri Feb 20 12:21:16 2009
Errors in file /opt/oracle/product/admin/pd01bko1/bdump/pd01bko1_arc2_487504.trc:
ORA-00604: error occurred at recursive SQL level
PING[ARC2]: Heartbeat failed to connect to standby 'sl02bko'. Error is 604.
Fri Feb 20 12:22:17 2009
Error 604 received logging on to the standby
Fri Feb 20 12:22:17 2009

# from the trace file :-

.. Detailed OCI error val is 604 and errmsg is 'ORA-00604: error occurred at recursive SQL level 1
ORA-06550: line 11, column 5:
PL/SQL: ORA-16224: Database Guard is enabled
ORA-06550: line 2, column 2:
PL/SQL: SQL Statement ignored

# Workaround was to change the guard to "none" until logical dataguard was activated, then switch back to "all".

alter database guard none;


alter database guard all;
select guard_status from v$database;

GUARD_S
-------
ALL

# Another option would be to disable the login trigger on the standby.