9 Replies Latest reply: May 16, 2012 2:38 PM by rysalka RSS

    Data Guard - total loss of primary

    rysalka
      A hypothetical question. If DG is running in Max Availability and automatic failover is disabled what happens if primary goes down (server crashes, for example) while it was shipping a log to standby? If I get on standby, would I be able to manually switchover to make standby primary and what happens to those logs that did not make to standby? If say there was some update to primary and that log did not get shipped? Thank you!
        • 1. Re: Data Guard - total loss of primary
          mseberg
          Hello;

          That's what a failover is for.

          Happy to share my test notes : ( Test was done in Max Availability - but does not show )

          http://www.visi.com/~mseberg/Data_Guard_Failover_Test_using_SQL.pdf

          In addition you should make sure your Standby redo is setup, your Flashback and you could also consider Real time apply.

          There are several Primary failures that can occur, in most cases you will not lose data if you setup correctly. If you cannot have data loss then you need to change your protection mode or consider a RAC solution.

          http://www.oracle.com/technetwork/database/features/availability/maa-documentation-155367.html

          http://hemantoracledba.blogspot.com/2009/04/rman-backup-and-recovery-for-loss-of.html



          Best Regards

          mseberg

          Edited by: mseberg on May 16, 2012 11:17 AM
          • 2. Re: Data Guard - total loss of primary
            rysalka
            Ok, thank you! But what happens if your primary goes down - e.g. server crash. What happens to the logs that do not get shipped to standby? Do you lose that information?

            We have experienced many "network glitches" whereby primary would failover to standby. So we have disabled failover for that reason.
            • 3. Re: Data Guard - total loss of primary
              CKPT
              In maximum availability architecture, Transactions do not commit until all redo data needed to recover those transactions has been written to the online redo logs & standby too..

              So In this architecture of maximum performance, if the redo stream not in written in logs of primary & standby , it changes mode in maximum performance. So still there is no lost.


              As an example if you take maximum performance real time, if primary server crashes, you will loose only uncommited transactions where log writer not occurred, if commit happens it immediately written into log files. So very minimal data lost.

              If you have severe problem with network why can't you go for maximum performance? I can say this is suitable for such environments.
              • 4. Re: Data Guard - total loss of primary
                rysalka
                We are in maximum availability with automatic failover disabled. I understand that transactions don't commit until all redo is shipped to standby. If primary server crashes though and automatic failover disabled, will we be able to swtichover manually from standby? Thank you!
                • 5. Re: Data Guard - total loss of primary
                  rysalka
                  I am confused on this: If Failover is disabled and primary database goes down, I cannot run switchover command from standby, correct? Can I run failover from standby then? Thank you!
                  • 6. Re: Data Guard - total loss of primary
                    mseberg
                    Hello again;

                    If Failover is disabled and primary database goes down, I cannot run switchover command from standby, correct? Can I run failover from standby then? Thank you!
                    OK, I'll try again. I assume you mean "Auto failover" is disabled. If so you can still do the failover as I posted in my first reply. Can you do a switchover if the Primary goes away, total loss or otherwise. No.

                    So your option would be a Manual Failover to the Standby. You seemed concerned about Data loss. Excellent, you should be. Make sure you have the correct number and size of Standby Redo logs on the Standby. Consider using "USING CURRENT LOGFILE" option when applying. The Standby Redo will buffer and the chances of data loss go down. Correct any network issues you have. If you need more please review these white papers :

                    http://www.oracle.com/technetwork/database/features/availability/maa-documentation-155367.html

                    Please consider closing some of your old questions too 40 (30 unresolved)

                    Best Regards

                    mseberg
                    • 7. Re: Data Guard - total loss of primary
                      rysalka
                      Yes, I meant auto for failover. Ok, thank you, it makes sense. If I am in Max Availability (aka commit doesn't happen until transactions are written to logs and are on standby), then number and size of logs on standby would bnot be an issue since they all should be there? So the only transactions we would be losing are those that were not commited, no?

                      I was not aware that I had to close questions, thank you, I will close them all now :)
                      • 8. Re: Data Guard - total loss of primary
                        mseberg
                        Correct.

                        Thanks for helping to keep the forum clean.

                        Best Regards

                        mseberg
                        • 9. Re: Data Guard - total loss of primary
                          rysalka
                          Great, thank you!