8 Replies Latest reply: May 9, 2014 10:57 AM by liaison1 RSS

    How to active a RAC standby?

    liaison1

      We are in process to build a RAC to RAC standby system and eventually to activate the standby for application switch over.   How to activate the RAC standby?   In this case, we do not care the status of primary database.

       

      Thanks,

        • 1. Re: How to active a RAC standby?
          BPeaslandDBA

          I suggest that you use and configure the DG Broker. This will handle your RAC databases just fine. If both primary and standby are available, you make the standby into a primary with a simple command:   switchover to standby_db;

          If the primary is unavailable, you failover with:    failover to standby_db;

           

          For more information, see:  Switchover and Failover Operations

           

          Cheers,
          Brian

          • 2. Re: How to active a RAC standby?
            oscrub

            Which version of Oracle are you using?

             

              In this case, we do not care the status of primary database.

            So I am assuming you mean a failover, where the primary database is considered to be gone.

             

            First stop the managed recovery process on your standby database:

             

            SQL> alter database recover managed standby database cancel;

             

            Then issue the command below to tell the standby database to consider the primary as gone and to apply all standby redo logs.

             

            SQL> alter database recover managed standby database finish;

             

            Then issue the following commands to complete the switchover process:

             

            SQL> alter database commit to switchover to primary with session shutdown;

             

            SQL> alter database open;

             

            Then open the other instances in the cluster, check listener and connection settings, verify application can now connect to the new primary.

             

            Regards,

            Oscar

            • 3. Re: How to active a RAC standby?
              liaison1

              The version is 10.2.0.4.

               

              What is the different below to the above procedure?

               

              alter database activate standby database;

              alter database open;

              • 4. Re: How to active a RAC standby?
                oscrub

                I might be mistaken, but 'alter database activate standby database' was the command used to activating a standby database in Oracle8i when Data Guard was known as Standby Server. In Oracle 9i it was renamed to Data Guard, and switchover was introduced, and hence the new command to 'alter database commit to switchover.' So I believe 'activate standby database' was kept for backward compatibility, but still functions the same way.

                • 5. Re: How to active a RAC standby?
                  Hemant K Chitale

                  An ACTIVATE STANDBY DATABASE is used with a Failover  --- which is a non-graceful cutover with potentially some transactions lost.  The ACTIVATE converts the Standby to a Primary.

                   

                  If you are doing a Switchover -- graceful with no data loss, you would use the COMMIT TO SWITCHOVER commands.

                   

                   

                  Hemant K Chitale


                  • 6. Re: How to active a RAC standby?
                    liaison1

                    I saw the 10R2 doc in activate the standby using the command 'alter database activate standby database'. 

                     

                    We are doing the migration from a 3-node RAC system another 3-node RAC by using standby method to migrate.    When switch over,  we will shutdown the original RAC databases.    In this case, which way should be use for us?

                     

                    option1: 

                     

                    'alter database activate standby database'

                    shutdown immediate

                    srvctl start database -d database_name

                     

                    option2:  

                     

                    SQL> alter database recover managed standby database cancel;

                     

                    Then issue the command below to tell the standby database to consider the primary as gone and to apply all standby redo logs.

                     

                    SQL> alter database recover managed standby database finish;

                     

                    Then issue the following commands to complete the switchover process:

                     

                    SQL> alter database commit to switchover to primary with session shutdown;
                    SQL> alter database open;

                     

                     

                    shutdown immediate

                    srvctl start database -d database_name

                     

                    What is the different?

                     

                    Thanks!

                    • 7. Re: How to active a RAC standby?
                      oscrub

                      They would both work, but I would be more comfortable with doing option 2. As I mentioned in my previous comment, both 'activate standby database' and 'commit to switchover to primary' perform similar functions, it's just the former is the command that was used in earlier versions of Oracle, where as the switchover command was used when Data Guard was introduced in Oracle 9i.

                      • 8. Re: How to active a RAC standby?
                        liaison1

                        Thanks for reply!