How do we ensure all log are applied before flashback?

All posts relating to Oracle database administration.

Moderator: Tim...

How do we ensure all log are applied before flashback?

Postby shrinika » Mon Jan 28, 2013 3:39 am

Tim,

I am using oracle11g R2 active data guard. I am testing the manual(no broker) failover scenario. After failover,
i need to flashback to SCN where it was failed over and convert the failed primary to standby database.

I can use the below query to find the scn and flashback to this SCN and restart the database as standby database.

SQL> SELECT TO_CHAR(STANDBY_BECAME_PRIMARY_SCN) FROM V$DATABASE;

My question is, I need to ensure, there is no archive logs missing when i failover before i flashback. How do i check this ?

For instance, Primary is crashed at archive log sequence#10 and failed over to standby. At the time of failover, the max log sequence in standby(new primary)
database is 8. After failover, if we flashback to SCN 8, then we will miss the two log sequence.In this case, i don't want to flashback. I manually, find the missing data
in failed primary database.

Any input is highly appreciated.
shrinika
Advisor
 
Posts: 255
Joined: Fri Jun 13, 2008 3:18 pm

Re: How do we ensure all log are applied before flashback?

Postby Tim... » Mon Jan 28, 2013 8:56 am

Hi.

Once you have failed over to the standby and started that up, that is your new primary database, so any logs that were missed before starting up the standby as the primary server are now irrelevant. That data is lost.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17935
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: How do we ensure all log are applied before flashback?

Postby shrinika » Tue Jan 29, 2013 1:42 am

Thanks!!
shrinika
Advisor
 
Posts: 255
Joined: Fri Jun 13, 2008 3:18 pm

Re: How do we ensure all log are applied before flashback?

Postby Tim... » Tue Jan 29, 2013 7:13 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17935
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 10 guests

cron