1 Reply Latest reply: Apr 23, 2013 1:53 AM by Mahir M. Quluzade RSS

    Start and cancel from DGMGRL or SQLPlus?

    SherrieK
      Oracle RAC 11.1.0.7 with DataGuard with DG Broker on 2-node clusters

      To start the apply process, we use sqlplus and the command:
      alter database recover managed standby database using current logfile disconnect ;

      To stop the apply process, we use:
      ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

      We usually these things from instance 1. Recently we notice that when the apply process is instance 2, we must cancel the apply process while sitting on node 2. I can't say with 100% surety that our apply instance has always been 1 and we just happened to always be on 1, but it seems that way.

      Now we are thinking that perhaps we should be setting PreferrredApplyInstance in dgmgrl, to start we should be doing an edit database 'db' set state='APPLY-ON' with apply instance='instance1', and the reverse to cancel.

      Does anyone have any insights into the pros and cons of using dgmgrl or sqlplus?

      Sherrie
        • 1. Re: Start and cancel from DGMGRL or SQLPlus?
          Mahir M. Quluzade
          Hi,
          ca107207 wrote:
          Oracle RAC 11.1.0.7 with DataGuard with DG Broker on 2-node clusters

          To start the apply process, we use sqlplus and the command:
          alter database recover managed standby database using current logfile disconnect ;

          To stop the apply process, we use:
          ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

          We usually these things from instance 1. Recently we notice that when the apply process is instance 2, we must cancel the apply process while sitting on node 2.
          I can't say with 100% surety that our apply instance has always been 1 and we just happened to always be on 1, but it seems that way.
          >
          Now we are thinking that perhaps we should be setting PreferrredApplyInstance in dgmgrl, to start we should be doing an edit database 'db' set state='APPLY-ON' with apply instance='instance1', and the reverse to cancel.

          Does anyone have any insights into the pros and cons of using dgmgrl or sqlplus?
          You are using DG Broker, Oracle Recommend do stop and start Apply process with DGMGRL.
           DGMGRL> EDIT DATABASE "DB" SET STATE ='APPLY-ON' WITH APPLY INSTANCE ='DB1' ;   --- Start Apply process on Instance 1 with  name DB1 
           DGMGRL> EDIT DATABASE "DB" SET STATE ='APPLY-OFF' WITH APPLY INSTANCE ='DB2' ;   --- Stop Apply  process on Instance 2 with name DB2 
          PreferredApplyInstance: name of the instance you prefer to be the apply instance
          ApplyInstanceTimeout: time period that Broker waits after detecting apply instance failure and before initiating the failover;
          default apply instance failure and before initiating the failover; default = 0

          How the Broker chooses the new apply instance
          If PreferredAppylInstance indicates an instance that is currently running, Broker selects it as the new apply instance
          Otherwise Broker picks a random instance that is currently running

          Regards
          Mahir M. Quluzade