4 Replies Latest reply: Mar 19, 2014 1:18 PM by 592815 RSS

    procedure to start/stop DG

    592815

      Hi Friends,

      regardless fail over/switch between primary and physical database, we need to stop/restart entire DG. which procedure with sequence action to stop/restart oracle 11g dataguard are should be implemented?

      SQLplus is ok for  above operation? stop/start primary DB at first ?

       

      Thanks

      newdba

        • 1. Re: procedure to start/stop DG
          mseberg

          Hello;

           

          Not exactly sure what you are asking but you can do something this:

           

          ORACLE_SID=STANDBY

           

          $ORACLE_HOME/bin/sqlplus /nolog <<EOF

          connect sys/oracle as sysdba

          startup mount

          alter database recover managed standby database disconnect from session;

          EOF

          echo `date`

           

          and

           

          ORACLE_SID=STANDBY

           

          $ORACLE_HOME/bin/sqlplus /nolog <<EOF

          connect sys/oracle as sysdba

          alter database recover managed standby database cancel;

          shutdown

          EOF

          echo `date`

           

          The scripts would need ENV settings to run in the background.

           

          Best Regards

           

          mseberg

          • 2. Re: procedure to start/stop DG
            592815

            Hi Mseberg,

             

            My question is how to shutdown and restart DG>

            It should be as

            shutdown entire DG

            shutdown standby DB ( as your statement in above).

            then shutdown primary DB

             

            during restart DG

            1) start primary DB at first

             

            2) then restart standby DB with redo apply

             

            ALl of DG processing should be recovered based on above sequences action.

             

            some wrong?

            Thanks

            • 3. Re: procedure to start/stop DG
              mseberg

              Hello again;

               

              You can just shutdown the Primary and it should pick up again without issue. However I DEFER, then shutdown, and then ENABLE.

               

              alter system set log_archive_dest_state_2=defer;

               

               

              alter system set log_archive_dest_state_2=ENABLE;

               

               

              The Standby will just sit and wait for the next sequence if you do it this way.

               

              Best Regards

               

              mseberg

              • 4. Re: procedure to start/stop DG
                592815

                It seems we can stop/start primary DB  at first during stop/start entire DG without data guard issue  except DEFER/ENABLE

                Do we need to flush any unsent redo from the primary database before shutdown? so to avoid zero data loss during entire data guard down and restart

                Thanks for your help.