Home » Server Options » Data Guard » Failover fails
icon5.gif  Failover fails [message #243546] Thu, 07 June 2007 13:03 Go to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

I attempt a failover with:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

And get this:

Thu Jun 7 13:00:19 2007
alter database recover managed standby database finish
Attempt to do a Terminal Recovery
Media Recovery Start: Managed Standby Recovery
Media Recovery Waiting for thread 1 seq# 639
There are no standby current logs; terminal recovery is not required.
Recovery interrupted.
Thu Jun 7 13:00:34 2007
Media Recovery user canceled with status 16137
ORA-16043 signalled during: alter database recover managed standby database fi...
Thu Jun 7 13:01:02 2007
alter database commit to switchover to primary
Thu Jun 7 13:01:02 2007
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
Database not recovered through End-Of-REDO
Database not recovered through End-Of-REDO
Switchover: Media recovery required - standby not in limbo
ORA-16139 signalled during: alter database commit to switchover to primary...


The Primary Database is down. How do I get around this error?

M
Re: Failover fails [message #243552 is a reply to message #243546] Thu, 07 June 2007 13:25 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

One thing I noticed: in a SWITCHOVER, the Primary Database sends an END-OF-REDO notification to the Standby Database with the "alter database recover managed standby database cancel;" statement (or perhaps with the "alter database commit to switchover to physical standby;" statement). It doesn't get this notification on a FAILOVER (because the Primary System is gone). Gotta find a way to get past this...
Re: Failover fails [message #243556 is a reply to message #243546] Thu, 07 June 2007 13:43 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

Here's how I got around it:

SQL> alter database activate standby database skip standby logfile;
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

This somehow provided me with the end-of-redo flag.

Before:
Thu Jun 7 12:42:55 2007
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
Database not recovered through End-Of-REDO
Database not recovered through End-Of-REDO
Switchover: Media recovery required - standby not in limbo
ORA-16139 signalled during: alter database commit to switchover to primary...

After:

Thu Jun 7 13:34:10 2007
alter database activate standby database skip standby logfile
Thu Jun 7 13:34:10 2007
ALTER DATABASE ACTIVATE [PHYSICAL] STANDBY DATABASE
RESETLOGS after incomplete recovery UNTIL CHANGE 2853615
Resetting resetlogs activation ID 2164751153 (0x81077b31)
Online log 6 of thread 0 was previously cleared
Online log 7 of thread 0 was previously cleared
Online log 8 of thread 0 was previously cleared
Online log 9 of thread 0 was previously cleared
Activation complete - Database shutdown not required
Completed: alter database activate standby database skip stan

Re: Failover fails [message #243563 is a reply to message #243556] Thu, 07 June 2007 14:06 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:
alter database activate standby database skip standby logfile


whats this statement for?
Re: Failover fails [message #243568 is a reply to message #243546] Thu, 07 June 2007 14:57 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

I believe it skips any redo data in the standby redo log. See:
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96653/role_management.htm#1024703

Step 4 Initiate the failover operation on the target physical standby database.
If...you have not manually registered any partial archived redo logs, issue the following statement:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;

Otherwise, you must issue the following statement:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH
2> SKIP STANDBY LOGFILE;

Basically, you lose the benefit of having LGWR transport mode, because the only thing you wind up with is in archived redo logs.

Re: Failover fails [message #243570 is a reply to message #243568] Thu, 07 June 2007 15:09 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
okay Thanks;)
Re: Failover fails [message #245988 is a reply to message #243546] Tue, 19 June 2007 08:58 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

A more precise answer is: it establishes a forced (vs. graceful) recovery. Oracle recommends that you do a graceful recovery (using SQL> alter database recover managed standby database finish;). Documentation found at: http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96653/stdbysql.htm#1007811

Mike
Re: Failover fails [message #246043 is a reply to message #245988] Tue, 19 June 2007 11:30 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
kewl man
Thanks a lot for link Wink
Previous Topic: Problem while mining archivelog in Logical Standby Database
Next Topic: Oracle 9i Database Failover
Goto Forum:
  


Current Time: Wed Sep 03 00:43:41 CDT 2014

Total time taken to generate the page: 0.06172 seconds