Time for action – failover with a logical standby using broker

Follow these steps to perform failover to a logical standby database using the Data Guard broker:

  1. Check both the primary and logical standby databases' status. If the primary database is completely unavailable, you can check the configuration status from the logical standby database as shown in the following code:
    DGMGRL> show configuration;
    Configuration - PACKT
      Protection Mode: MaxPerformance
      Databases:
        turkey_un    - Primary database
        INDIA_UN     - Logical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    ORA-16625: cannot reach database "turkey_UN"
    DGM-17017: unable to determine configuration status
  2. Perform the failover to the logical standby database. Connect to the DGMGRL utility of the logical standby database and issue the command shown in the following screenshot to perform failover:
    Time for action – failover with a logical standby using broker

    On the alert logfile, you will see the following:

    2012-10-13 16:00:00.862                      Executing SQL [ALTER DATABASE activate logical standby database finish apply]
    2012-10-13 16:00:02.348                      SQL [ALTER DATABASE activate logical standby database finish apply] Executed successfully
    2012-10-13 16:00:02.354                      RSM: refreshing IncarnationTable internal property. New value is '2,3166193,796392156,1*1,3166192,796392049,0#'
    2012-10-13 16:00:02.366                      Database Resource SetState succeeded
    

    Tip

    During failover to a physical or logical standby database using broker, you can use the IMMEDIATE option to perform failover without waiting for applying any redo. You can use the following command:

    DGMGRL> FAILOVER TO <DB_UNIQUE_NAME> IMMEDIATE

  3. Check the status of the new primary database. After a successful failover, the new primary database will be in READ WRITE mode as shown in the following code:
    SQL> select db_unique_name,database_role,open_mode from v$database;
    DB_UNIQUE_NAME       DATABASE_ROLE    OPEN_MODE
    -------------------- ---------------- --------------------
    india_un             PRIMARY          READ WRITE
    DGMGRL> show configuration;
    Configuration - PACKT
      Protection Mode: MaxPerformance
      Databases:
        INDIA_UN     - Primary database
        turkey_un    - Logical standby database (disabled)
          ORA-16661: the standby database needs to be reinstated
    Fast-Start Failover: DISABLED
    Configuration Status:
    SUCCESS

What just happened?

We have discussed how to perform failover to a physical standby database and a logical standby database. To perform this, we have used both SQL*Plus and the Data Guard broker.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.54.255