1 2 Previous Next 20 Replies Latest reply: Jun 21, 2012 5:16 AM by mseberg RSS

    Reg: Standby Database

    New_To_Oracle_7912
      Hello,

      In StandBy database,

      Is it necessary to cancel the MANAGED RECOVERY MODE before performing the SHUTDOWN immediate option. IF yes WHY

      or

      instead of cancelling can i directly issue the SHUTDOWN IMMEDIATE; command

      Thanks,
      Sunil
        • 1. Re: Reg: Standby Database
          Mahir M. Quluzade
          This is second same post here!

          What is your database version ?
          • 2. Re: Reg: Standby Database
            Mahir M. Quluzade
            Oracle® Data Guard Concepts and Administration
            *11g Release 2 (11.2)*
            Part Number E25608-03

            *9.1.2 Shutting Down a Physical Standby Database*

            Use the SQL*Plus SHUTDOWN command to stop Redo Apply and shut down a physical standby database. Control is not returned to the session that initiates a database shutdown until shutdown is complete.

            If the primary database is up and running, defer the standby destination on the primary database and perform a log switch before shutting down the physical standby database.


            Oracle Data Guard Concepts and Administration
            Release 2 (9.2)
            Release 2 (10.2)
            *8 Managing a Physical Standby Database*

            *8.1.2 Shutting Down a Physical Standby Database*

            To shut down a physical standby database and stop Redo Apply, use the SQL*Plus SHUTDOWN statement. Control is not returned to the session that initiates a database shutdown until shutdown is complete.

            If the primary database is up and running, defer the destination on the primary database and perform a log switch before shutting down the standby database.

            To stop Redo Apply before shutting down the database, use the following steps:

            Issue the following query to find out if the standby database is performing Redo Apply or real-time apply. If the MRP0 or MRP process exists, then the standby database is applying redo.

            SQL> SELECT PROCESS, STATUS FROM V$MANAGED_STANDBY;
            If Redo Apply is running, cancel it as shown in the following example:

            SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
            Shut down the standby database.

            SQL> SHUTDOWN IMMEDIATE;



            Regards
            Mahir M. Quluzade
            www.mahir-quluzade.com
            • 3. Re: Reg: Standby Database
              New_To_Oracle_7912
              Then what is the need of RECOVER MANAGED STANDBY DATABASE CANCEL; command

              Because if i issue the shutdown command then also managed recovery process is going to be cancelled

              What is the need of RECOVER MANAGED STANDBY DATABASE clause

              I am using Oracle 11g

              Edited by: 941974 on Jun 20, 2012 11:06 PM
              • 4. Re: Reg: Standby Database
                Mahir M. Quluzade
                941974 wrote:
                Then what is the need of RECOVER MANAGED STANDBY DATABASE CANCEL; command

                Because if i issue the shutdown command then also managed recovery process is going to be cancelled

                What is the need of RECOVER MANAGED STANDBY DATABASE clause

                I am using Oracle 11g

                Edited by: 941974 on Jun 20, 2012 11:06 PM
                RECOVER MANAGED STANDBY DATABASE CANCEL; - command is not using only when database shutdown. for example before 11g version (before Active Data Guard)
                if you want open stand by database you must cancel apply and open database read only. afte 11g come active data guard yolu can open database read only with apply, means you can not need cancel or stop apply service.


                Regards
                Mahir M. Quluzade
                www.mahir-quluzade.com
                • 5. Re: Reg: Standby Database
                  New_To_Oracle_7912
                  Then is it necessary to check the managed mode before i shutdown
                  • 6. Re: Reg: Standby Database
                    Mahir M. Quluzade
                    If you are using 11.2 and SHUTDOWN IMMEDIATE not necessary, only not use SHUTDOWN ABORT.

                    if you are not created broker-managed data guard configuration. recommend is create and manage standby databases very easy.

                    Regards
                    Mahir M. Quluzade
                    www.mahir-quluzade.com
                    • 7. Re: Reg: Standby Database
                      CKPT
                      941974 wrote:
                      Then is it necessary to check the managed mode before i shutdown
                      when you wont cancel MRP and going to shutdown, Recovery process going to be terminated of course nothing will happen, but its not safe.
                      When recovery is in progress, it will be in middle. So always safely stop the recovery & perform database shutdown.

                      You are 11g, Are you using ACTIVE DATAGUARD?
                      Then the database will be in READ ONLY Mode, so always

                      1) Stop MRP
                      2) Shutdown database safely.
                      • 8. Re: Reg: Standby Database
                        New_To_Oracle_7912
                        It's not safe means.

                        What may happen when i startup?

                        Can you be more specific please.

                        Edited by: 941974 on Jun 21, 2012 12:22 AM
                        • 9. Re: Reg: Standby Database
                          CKPT
                          941974 wrote:
                          It's not safe means.

                          What may happen when i startup?

                          Can you be more specific please.
                          BTW, its not going to damage anything.. but when recovery is in progress,
                          Your archived redo will have both committed and uncommitted, the same changes when applying when its in middle. these changes wont applicable.

                          DBWR process which wrote the changes of all and it plays a key role during your standby database operations also Media Recovery Coordinator and multiple
                          parallel apply processes.

                          even if you give "Shutdown abort" in primary, Instance recvoery will be performed, which is an highly dangerous, of course there would be no issues on standby.
                          I have question what is the difficulty to use "Cancel MRP"?
                          • 10. Re: Reg: Standby Database
                            New_To_Oracle_7912
                            Ya thank you for your answer.

                            I have a final doubt.

                            If i cancel the managed mode in between only committed transaction will be saved and uncommitted transaction will be rolled back.

                            My doubt is, when will the abrupted part of Archieve log file is going to be executed.
                            • 11. Re: Reg: Standby Database
                              CKPT
                              My doubt is, when will the abrupted part of Archieve log file is going to be executed.
                              Abrupted? You mean interrupted?

                              Recovery will be performed based on SCN, so when you look at column CURRENT_SCN, thats the latest SCN of database. Oracle will start perform to recovery from that SCN.

                              Can you describe more your question if explanation is not reaching?
                              • 12. Re: Reg: Standby Database
                                New_To_Oracle_7912
                                Consider the standby database,

                                Doubt 1 - Is it mandatory to cancel the managed recovery process.

                                Doubt 2 - If No, Then what is the need to check during the SHUTDOWN process.


                                Your archived redo will have both committed and uncommitted, the same changes when applying when its in middle. these changes wont applicable.
                                Doubt 3 - When the primary database generates a redo log file and it is sent to standby, Is there any link with that redo and primary database. So how that redo log will be affected if i terminate(Issue SHUTDOWN without cancelling managed recovery) in the mid of redo apply to standby database.

                                Doubt 4 - If i cancel the apply of log files in the middle, Next while applying will it apply from first or The place of last committed.

                                Doubt 5 - As i read, When i cancel the MRP it waits for completion of applying the log files
                                Please Refer the below link
                                http://docs.oracle.com/cd/B10501_01/server.920/a96653/sql_stmts.htm#1015978
                                • 13. Re: Reg: Standby Database
                                  New_To_Oracle_7912
                                  Or else just give me the steps to startup and shutdown both the standby and primary server.

                                  If you are using Managed command please specify the reason.

                                  I am in confusion in cancelling the Managed Recovery Process.

                                  My big doubt is What happens if i don't cancel the MRP and just when i issue the Shutdown Immediate command.
                                  • 14. Re: Reg: Standby Database
                                    Mahir M. Quluzade
                                    941974 wrote:
                                    Consider the standby database,

                                    Doubt 1 - Is it mandatory to cancel the managed recovery process.
                                    It is not mandotary, but if you want safety you can stop MRP
                                    Doubt 2 - If No, Then what is the need to check during the SHUTDOWN process.
                                    If you are using shutdown immediate not need any check .
                                    >
                                    Your archived redo will have both committed and uncommitted, the same changes when applying when its in middle. these changes wont applicable.
                                    Doubt 3 - When the primary database generates a redo log file and it is sent to standby, Is there any link with that redo and primary database. So how that redo log will be affected if i terminate(Issue SHUTDOWN without cancelling managed recovery) in the mid of redo apply to standby database.
                                    I think this "link" is apply service, becouse apply service appling all chages genereted from primary database.
                                    Doubt 4 - If i cancel the apply of log files in the middle, Next while applying will it apply from first or The place of last committed.
                                    You know Applied column have two value YES, NO. Means a archived log is applied or not applied, not any middle.
                                    Yes if MRP is appling a log, then when you cancel process is continues to finish.
                                    Doubt 5 - As i read, When i cancel the MRP it waits for completion of applying the log files
                                    Please Refer the below link
                                    http://docs.oracle.com/cd/B10501_01/server.920/a96653/sql_stmts.htm#1015978
                                    1 2 Previous Next