1 2 Previous Next 17 Replies Latest reply: Feb 26, 2013 1:43 AM by user11952526 RSS

    ORA-01153: an incompatible media recovery is active

    user11952526
      Hi,

      My database version is 11.2.0.1.0 running on AIX 64-bit.
      When I am trying to keep my standby database in managed mode getting the following error... but archives are getting applied.
      =======================================================================================================================================
      SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
      ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
      *
      ERROR at line 1:
      ORA-01153: an incompatible media recovery is active
      =======================================================================================================================================

      Did the following...
      1. Cancelled the recovery.
      2. shutdown the standby database.
      3. Startup the standby DB in NOMOUNT.
      4. Then in mounted - ALTER DATABASE MOUNT STANDBY DATABASE;
      After starting the STANDBY DB in MOUNT, automatically archives were getting applied. I observerd that MRP0 was started.

      SQL> SELECT PROCESS, STATUS, SEQUENCE# FROM V$MANAGED_STANDBY;

      PROCESS STATUS SEQUENCE#
      --------- ------------ ----------
      ARCH CLOSING 39020
      ARCH CONNECTED 0
      ARCH CONNECTED 0
      ARCH CONNECTED 0
      MRP0 WAIT_FOR_LOG 39021
      RFS IDLE 39065
      RFS IDLE 39023
      RFS IDLE 39021
      RFS IDLE 39022

      9 rows selected.
      =======================================================================================================================================
      From Alert log ...

      ALTER DATABASE MOUNT STANDBY DATABASE
      ARCH: STARTING ARCH PROCESSES
      Tue Feb 19 02:16:01 2013
      ARC0 started with pid=21, OS id=18874512
      ARC0: Archival started
      ARCH: STARTING ARCH PROCESSES COMPLETE
      ARC0: STARTING ARCH PROCESSES
      Tue Feb 19 02:16:02 2013
      ARC1 started with pid=22, OS id=19071106
      Tue Feb 19 02:16:02 2013
      Successful mount of redo thread 1, with mount id 1873774620
      Tue Feb 19 02:16:02 2013
      ARC2 started with pid=23, OS id=20381810
      Physical Standby Database mounted.
      Lost write protection disabled
      Tue Feb 19 02:16:02 2013
      ARC1: Archival startedARC3 started with pid=24, OS id=20447348

      ARC2: Archival started
      ARC2: Becoming the 'no FAL' ARCH
      ARC1: Becoming the heartbeat ARCH
      Completed: ALTER DATABASE MOUNT STANDBY DATABASE
      ARC3: Archival started
      ARC0: STARTING ARCH PROCESSES COMPLETE
      Tue Feb 19 02:16:04 2013
      Starting Data Guard Broker (DMON)
      Tue Feb 19 02:16:04 2013
      NSV0 started with pid=25, OS id=20512886
      =======================================================================================================================================

      I would like to know that in 11g R2, does MRP0 process starts automatically ???
      Thanks.
        • 1. Re: ORA-01153: an incompatible media recovery is active
          CKPT
          When I am trying to keep my standby database in managed mode getting the following error... but archives are getting applied.
          ERROR at line 1:
          ORA-01153: an incompatible media recovery is active
          This is not the error, It is your mistake of course :-)
          When MRP(Media recovery process) is already running and again no need to start. If in case MRP was not running or crashed then only you have to use it.
          Moreover if you are using Broker MRP will be started automatically and hence no need to stop MRP once again.

          To check whether MRP is running or not from OS, You can see as below
          $ps -ef|grep mrp

          or from view you can check the process "v$managed_standby"

          If you use commands as below order then it will work,

          1) SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; -- Cancel MRP
          2) SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; -- Start MRP.

          Hope this clears.
          • 2. Re: ORA-01153: an incompatible media recovery is active
            Sunny kichloo
            Refer this

            http://chenguangblog.wordpress.com/2011/02/20/encountering-ora-01153-an-incompatible-media-recovery-is-active-when-starting-up-phycial-standby/
            • 3. Re: ORA-01153: an incompatible media recovery is active
              user11952526
              Hi,

              Thanks for the update.
              Sorry i forgot to mention, I am using 11g R2 Dataguard physical standby database.
              Please let me know the steps to shut down 11g R2 Dataguard physical standby database. I do NOT want MRP process to start automatically.

              Thanks.
              • 4. Re: ORA-01153: an incompatible media recovery is active
                Sunny kichloo
                Refer this docs for shutting down standby database.

                http://www.adp-gmbh.ch/ora/data_guard/shut_physical_standby_db.html

                http://docs.oracle.com/cd/E11882_01/server.112/e25608/manage_ps.htm#i1007681

                Also You have to start MRP process to start recovery.It doesn't start automatically.
                • 5. Re: ORA-01153: an incompatible media recovery is active
                  user11952526
                  Hi,

                  What is the steps for shutting for dataguard standby database ???

                  NAME OPEN_MODE DATABASE_ROLE PROTECTION_MODE DATAGUAR GUARD_S
                  --------- -------------------- ---------------- -------------------- -------- -------
                  SIB READ WRITE PRIMARY MAXIMUM PERFORMANCE ENABLED NONE

                  Thanks.
                  • 6. Re: ORA-01153: an incompatible media recovery is active
                    CKPT
                    I don't know why you are not prompting to start MRP automatically. Standby is for the recover to perfrom all the times.

                    If you want to shutdown standby database, You have to follow two steps.
                    1) Cancel MRP -SQL> alter database recover managed standby database cancel;
                    2) Shutdown database - SQL> shutdown immediate;
                    • 7. Re: ORA-01153: an incompatible media recovery is active
                      UweHesse
                      If you (for whatever reason) do not want MRP working and you use the Data Guard Broker (DMON process active), you can simply say
                      DGMGRL> edit database DB_UNIQUE_NAMEofYourStandbyDB set state=apply-off;
                      This changes the Data Guard Configuration accordingly. Else, DMON assumes that MRP is supposed to work and will (re-)start it.

                      Kind regards
                      Uwe Hesse

                      "Don't believe it, test it!"
                      http://uhesse.com
                      • 8. Re: ORA-01153: an incompatible media recovery is active
                        CKPT
                        Uwe Hesse wrote:
                        If you (for whatever reason) do not want MRP working and you use the Data Guard Broker (DMON process active), you can simply say
                        DGMGRL> edit database DB_UNIQUE_NAMEofYourStandbyDB set state=apply-off;
                        This changes the Data Guard Configuration accordingly. Else, DMON assumes that MRP is supposed to work and will (re-)start it.

                        Kind regards
                        Uwe Hesse

                        "Don't believe it, test it!"
                        http://uhesse.com
                        Uwe,
                        Perfect, When we are using Broker. it is highly recommended to use only broker to avoid misconception between configuration file and the instance.
                        Let's suppose if we stop MRP using SQL Plus then broker wont start immediately i guess. Of course if we bounce instance then whenever instance starts DMON will start MRP also.
                        And if we set using Broker, then yes DMON wont start until unless we enable it using "SET STATE='APPLY-ON'"
                        Please let me know if my assumption is wrong. Thanks for that.
                        • 9. Re: ORA-01153: an incompatible media recovery is active
                          UweHesse
                          Yes, it is (almost) exactly as you say :-)
                          >
                          When we are using Broker. it is highly recommended to use only broker to avoid misconception between configuration file and the instance.
                          Let's suppose if we stop MRP using SQL Plus then broker wont start immediately i guess. Of course if we bounce instance then whenever instance starts DMON will start MRP also.
                          And if we set using Broker, then yes DMON wont start until unless we enable it using "SET STATE='APPLY-ON'"
                          >

                          I have seen the DMON starting MRP after a recover managed standby database cancel again without instance bounce even, though.

                          Kind regards
                          Uwe Hesse

                          "Don't believe it, test it!"
                          http://uhesse.com
                          • 10. Re: ORA-01153: an incompatible media recovery is active
                            CKPT
                            I have seen the DMON starting MRP after a recover managed standby database cancel again without instance bounce even, though.

                            Kind regards
                            Uwe Hesse

                            "Don't believe it, test it!"
                            http://uhesse.com
                            Uwe,

                            For this test i have created standby and configured broker to check behavior DMON if we stop MRP from SQL* Plus. Below are the outputs.
                            SQL> select * from v$version;
                            BANNER
                            --------------------------------------------------------------------------------
                            Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
                            PL/SQL Release 11.2.0.3.0 - Production
                            CORE    11.2.0.3.0      Production
                            TNS for Linux: Version 11.2.0.3.0 - Production
                            NLSRTL Version 11.2.0.3.0 - Production
                            
                            SQL> 
                            
                            " Stopped MRP once by Broker"
                            
                            DGMGRL> edit database 'STANDBY_UN' set state='APPLY-OFF';
                            Succeeded.
                            DGMGRL> 
                            
                            "MRP stopped"
                            [oracle@oracle-stby ~]$ ps -ef|grep mrp 
                            oracle    6892  6534  0 00:07 pts/1    00:00:00 /bin/bash -c ps -ef|grep mrp
                            oracle    6894  6892  0 00:07 pts/1    00:00:00 grep mrp
                            [oracle@oracle-stby ~]$ 
                            
                            " Stopped MRP once again using Broker"
                            
                            DGMGRL> edit database 'STANDBY_UN' set state='APPLY-ON';
                            Succeeded.
                            DGMGRL> 
                            
                            "MRP started"
                            
                            [oracle@oracle-stby ~]$ ps -ef|grep mrp
                            oracle    7209     1  0 00:10 ?        00:00:00 ora_mrp0_STANDBY
                            oracle    7213  4827  0 00:11 pts/1    00:00:00 grep mrp
                            [oracle@oracle-stby ~]$ 
                            
                            "Now started MRP using SQL* Plus even though Data Guard managed by Broker"
                            
                            SQL> alter database recover managed standby database cancel;
                            Database altered.
                            SQL> 
                            
                            " From Alert log file - Check TimeStamp "
                            "Fri Feb 22 00:11:38 2013"
                            .............
                            MRP0: Background Media Recovery process shutdown (STANDBY)
                            Managed Standby Recovery Canceled (STANDBY)
                            Completed: alter database recover managed standby database cancel
                            
                            "Now After Several period checking MRP " 
                            
                            Fri Feb 22 00:17:02 IST 2013
                            [oracle@oracle-stby ~]$ ps -ef|grep dmon
                            oracle    6985     1  0 00:08 ?        00:00:00 ora_dmon_STANDBY
                            oracle    8057  7111  0 00:35 pts/3    00:00:00 grep dmon
                            [oracle@oracle-stby ~]$ date
                            
                            Fri Feb 22 00:27:33 IST 2013
                            [oracle@oracle-stby ~]$ ps -ef|grep mrp
                            oracle    7777  7111  0 00:27 pts/3    00:00:00 grep mrp
                            [oracle@oracle-stby ~]$ 
                            
                            [oracle@oracle-stby ~]$ date
                            Fri Feb 22 00:31:19 IST 2013
                            [oracle@oracle-stby ~]$ ps -ef|grep mrp
                            oracle    7910  7111  0 00:31 pts/3    00:00:00 grep mrp
                            [oracle@oracle-stby ~]$ 
                            
                            "Fri Feb 22 00:37:27 IST 2013"
                            [oracle@oracle-stby ~]$ ps -ef|grep dmon
                            oracle    6985     1  0 00:08 ?        00:00:00 ora_dmon_INDIA
                            oracle    8111  7111  0 00:37 pts/3    00:00:00 grep dmon
                            So it sense me that after almost *25 to 30 minutes* DMON started ? Because it may be done health check by broker as per the settings of below parameters?
                            But i cannot see any update as MRP started either in alert log or even any information from broker log file
                            >
                            Creating process RSM0
                            02/22/2013 00:11:01
                            Command EDIT DATABASE STANDBY_UN SET STATE = APPLY-ON completed
                            >
                              Properties:
                                FastStartFailoverThreshold      = '30'
                               "OperationTimeout                = '30'"
                                FastStartFailoverLagLimit       = '30'
                                CommunicationTimeout            = '180'
                                FastStartFailoverAutoReinstate  = 'TRUE'
                                FastStartFailoverPmyShutdown    = 'TRUE'
                                BystandersFollowRoleChange      = 'ALL'
                            Fast-Start Failover: DISABLED
                            Configuration Status:
                            ERROR
                            DGMGRL> 
                            Fine, Again i checked but cannot see MRP running on standby.
                            "Fri Feb 22 00:49:41 IST 2013"
                            [oracle@oracle-stby ~]$ ps -ef|grep dmon
                            oracle    6985     1  0 00:08 ?        00:00:00 ora_dmon_STANDBY
                            oracle    8599  7111  0 00:49 pts/3    00:00:00 grep dmon
                            [oracle@oracle-stby ~]$ ps -ef|grep mrp
                            oracle    8602  7111  0 00:49 pts/3    00:00:00 grep mrp
                            [oracle@oracle-stby ~]$ 
                            Almost i have monitored a hour and no MRP was running even though any data is there to apply or there is no information from any source of logs.

                            Even later
                            [oracle@oracle-stby ~]$ date
                            Fri Feb 22 01:13:58 IST 2013
                            [oracle@oracle-stby ~]$ ps -ef|grep dmon
                            oracle    6985     1  0 00:08 ?        00:00:00 ora_dmon_STANDBY
                            oracle    9403  7111  0 01:14 pts/3    00:00:00 grep dmon
                            [oracle@oracle-stby ~]$ ps -ef|grep mrp
                            oracle    9405  7111  0 01:14 pts/3    00:00:00 grep mrp
                            [oracle@oracle-stby ~]$ 
                            So based on above findings, DMON wont start MRP even we stop MRP from SQL* Plus, Please review and let me know your findings.

                            Thanks.

                            Edited by: CKPT on Feb 22, 2013 1:25 AM
                            • 11. Re: ORA-01153: an incompatible media recovery is active
                              UweHesse
                              Thank you for this test and for bringing it to my attention - that is one of the things I mean with my slogan :-)

                              I just checked it myself with 11.2.0.3
                              After having done recover managed standby database cancel on the Standby, DGMGRL shows:
                              [oracle@uhesse1 ~]$ dgmgrl sys/oracle@prima "show configuration"
                              DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production
                              
                              Copyright (c) 2000, 2009, Oracle. All rights reserved.
                              
                              Welcome to DGMGRL, type "help" for information.
                              Connected.
                              
                              Configuration - myconf
                              
                                Protection Mode: MaxPerformance
                                Databases:
                                  prima - Primary database
                                  physt - Physical standby database
                                    Error: ORA-16766: Redo Apply is stopped
                              
                              Fast-Start Failover: DISABLED
                              
                              Configuration Status:
                              ERROR
                              
                              [oracle@uhesse1 ~]$ oerr ora 16766
                              16766, 00000, "Redo Apply is stopped"
                              // *Cause:  Redo Apply was stopped when it should have been running.
                              // *Action: Check the alert log to see why Redo Apply terminated, correct any
                              //          problems that may exist, and restart Redo Apply by setting the
                              //          physical standby database state to APPLY-ON.
                              And this did not change yet after about 20 minutes now.
                              I'm pretty sure that this was not always the behavior - in some older versions DMON did restart MRP automatically.
                              But I can't prove it presently, so you may take it just anecdotal.

                              Anyways, I think we can tell by the error message above that using recover managed standby database cancel is not the clean way to stop Redo Apply when using the Data Guard Broker.

                              Kind regards
                              Uwe Hesse

                              "Don't believe it, test it! I mean it :-) "
                              http://uhesse.com
                              • 12. Re: ORA-01153: an incompatible media recovery is active
                                user11952526
                                Uwe,

                                Thank a lot Uwe!!!
                                This is what I was looking for, because when we use Broker, recovery process (MRP) in physical standby should be stopped from DGMGRL prompt using SET STATE='APPLY-OFF and SET STATE='APPLY-ON', if we do not follow this procedure then after bouncing the standby database recovery process will start automatically immediate after mounting the standby database.

                                Thanks.
                                • 13. Re: ORA-01153: an incompatible media recovery is active
                                  user11952526
                                  CKPT,

                                  Thanks a lot for this test!
                                  It is really helpful.

                                  Regards.
                                  • 14. Re: ORA-01153: an incompatible media recovery is active
                                    user11952526
                                    Uwe and CKPT,

                                    I got one last clarification/doubt,

                                    As in the case of Broker, in physical standby we need to use DGMGRL prompt using SET STATE='APPLY-OFF and SET STATE='APPLY-ON' for shutting down.

                                    For Primary database bounce can we use the following two SQL commands before shutdown the primary or do we need to use DGMGRL ???

                                    ALTER SYSTEM SET DG_BROKER_START=FALSE SCOPE=BOTH;
                                    ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=DEFER SCOPE=BOTH;


                                    After primary database bounce can we enable the standby with the below SQL commands ???

                                    ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
                                    ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=BOTH;

                                    Note : Here Physical standby is configured using Broker and we are NOT switching over, just primary database bounce.


                                    Thanks.

                                    Edited by: user11952526 on Feb 22, 2013 11:05 AM

                                    Edited by: user11952526 on Feb 22, 2013 2:56 PM
                                    1 2 Previous Next