3 Replies Latest reply: Nov 21, 2013 7:24 AM by mseberg RSS

    Starting / Stopping Databases using DGMGRL

    Jimbo


      Hi,

       

      I was previously using Sqlplus to manage my Data Guard environment but I have not converted to using DGMGRL.

       

      I was wanting to check ihow I start/stop my various databases using DGMGRL

       

      For my primary I guess I use

      DGMGRL> startup;

       

      Q1. For my logical standby do I use

      DGMGRL> startup;

       

      Under sqlplus I then had to

      alter database start logical standby apply immediate;

       

      Q2. Do I still need to do this if the Broker is managing the standby ?

       

      Q3. To shutdown the Logical Standby I guess I simply use

      DGMGRL> shutdown;

       

      Q4. For my Physical Standby I was using

      startup nomount;

      alter database mount standby database;

      alter database recover managed standby database disconnect;

       

      How does this translate into DGMGRL ?

       

      Q5. To close the Physical Standby I was using

      alter database recover managed standby database cancel;

       

      shutdown;

       

      Again how does this translate into DGMGRL ?

       

      many thanks,

      Jim

        • 1. Re: Starting / Stopping Databases using DGMGRL
          ozgurumut

          Hi Jim,

           

          You can find some informations about DGMRL commands.

          Data Guard Command-Line Interface Reference

           

          And others,

           

          Q4. For my Physical Standby I was using

          startup nomount; 

          alter database mount standby database;

          alter database recover managed standby database disconnect from session;


          Q5. To close the Physical Standby I was using

          alter database recover managed standby database cancel;

          shutdown immediate;


          • 2. Re: Starting / Stopping Databases using DGMGRL
            Mahir M. Quluzade

            Jimbo wrote:

             


            Hi,

             

            I was previously using Sqlplus to manage my Data Guard environment but I have not converted to using DGMGRL.

             

            I was wanting to check ihow I start/stop my various databases using DGMGRL

             

            For my primary I guess I use

            DGMGRL> startup;

             

            Q1. For my logical standby do I use

            DGMGRL> startup;

             

            Under sqlplus I then had to

            alter database start logical standby apply immediate;

            Q2. Do I still need to do this if the Broker is managing the standby ?

             

            Read ozgurumut's link, from before reply

             

             

            DGMGRL> edit database <standby database> set  state='APPLY-ON';

             

             

            In the default, dgmgrl starting apply process

             

             

            Q3. To shutdown the Logical Standby I guess I simply use

            DGMGRL> shutdown;


            Q4. For my Physical Standby I was using

            startup nomount;

            alter database mount standby database;

            alter database recover managed standby database disconnect;

             

            How does this translate into DGMGRL ?

             

             

            DGMGRL> startup mount;

            DGMGRL> edit database <standby> set state='APPLY-ON'; -- it is not need, if stopped apply before shutdown

             

             

            Q5. To close the Physical Standby I was using

            alter database recover managed standby database cancel;

             

            DGMGRL> edit database <standby> set state='APPLY-OFF';

             

             

            Regards

            Mahir M. Quluzade

             

             

            p.s. ozgurumut I'm very glad see you at OTN forum my friend!

            • 3. Re: Starting / Stopping Databases using DGMGRL
              mseberg

              Hello;

               

              Everything can and should be done with the dgmgrl utility:

               

               

               

              Q1

               

               

              DGMGRL> STARTUP;

              DGMGRL> STARTUP NOMOUNT;

              DGMGRL> STARTUP MOUNT;

              DGMGRL> STARTUP OPEN;

              DGMGRL> STARTUP FORCE;

              DGMGRL> STARTUP FORCE RESTRICT NOMOUNT;

              DGMGRL> STARTUP PFILE=initStandby.ora NOMOUNT;

               

               

              Q2

               

              DGMGRL> EDIT DATABASE Standby SET STATE='APPLY-OFF';

              DGMGRL> EDIT DATABASE Standby SET STATE='APPLY-ON';

               

               

              Q3

               

               

              DGMGRL> SHUTDOWN;

              DGMGRL> SHUTDOWN NORMAL;

              DGMGRL> SHUT IMMEDIATE;

              DGMGRL> SHUT ABORT;

               

               

               

               

              Q4

               

              DGMGRL> EDIT DATABASE Standby SET STATE='APPLY-ON';

               

               

              Q5

               

              Covered by examples in Q1 - Q4

               

               

              Best Regards

               

              mseberg