Sun Cluster Data Service for Oracle Guide for Solaris OS

Changing the Role of a DataGuard Instance

Database role failover or switchover is possible between an Oracle primary database and an Oracle standby database. When you use Oracle commands to change the role of DataGuard instances, the changes are not propagated to the Sun Cluster resources that represent these instances. Therefore, you must also use Sun Cluster commands to change extension properties of these resources to ensure that database instances are started in the correct role.

ProcedureHow to Change the Role of a DataGuard Instance

  1. Prevent Sun Cluster from starting the instance in an incorrect role.

    If a node or zone fails while you are changing the role of a DataGuard instance, Sun Cluster might restart the instance in an incorrect role. To prevent this possibility, change the Dataguard_role extension property of the Oracle server resource that represents the instance to IN_TRANSITION.


    # clresource set -p Dataguard_role=IN_TRANSITION server-rs
    
  2. Perform the required operations on the Oracle database to convert the database to a new role.

  3. Change the following extension properties of the Oracle server resource that represents the instance to reflect the new role of the instance:

    • Dataguard_role

    • Standby_mode

    The required combination of Dataguard_role and Standby_mode depends on the change of role, as follows:

    • To change from a primary database to a physical standby database, run the following command:


      # clresource set -p Dataguard_role=STANDBY -p Standby_mode=PHYSICAL server-rs
      
    • To change from a primary database to a logical standby database, run the following command:


      # clresource set -p Dataguard_role=STANDBY \
       -p Standby_mode=LOGICAL server-rs
      
    • To change from a standby database to a primary database, run the following command:


      # clresource set -p Dataguard_role=PRIMARY server-rs