Time for action – configuring fast-start failover

The following steps will help you configure FSFO in a configuration managed by the Data Guard broker:

  1. Check if Data Guard is in the Maximum Performance(11gRx) or Maximum Availability mode using the following command:
    DGMGRL> show configuration
    Configuration - PACKT
      Protection Mode: MaxPerformance
      Databases:
        TURKEY_UN - Primary database
        INDIA_UN  - Physical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    SUCCESS
    
  2. If your configuration is in the Maximum Availability mode, make sure that LogXptMode is set to synchronous redo transport.
  3. Make sure you have configured a flashback database and fast recovery area. This is applicable on both the primary and standby databases and helpful in case you want to reinstate the old primary database or perform a flashback as shown in the following query:
    SQL> select flashback_on from v$database;
    FLASHBACK_ON
    ------------------
    NO
  4. We must set some parameters before turning on flashback. These parameters are DB_FLASHBACK_RETENTION_TARGET, DB_RECOVERY_FILE_DEST_SIZE, and DB_RECOVERY_FILE_DEST. The following query shows you how to set these parameters:
    SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=5760;
    System altered.
    SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=20G;
    System altered.
    SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='/data/FLASHBACK';
    System altered.
    SQL> ALTER DATABASE FLASHBACK ON;
    Database altered.

    Tip

    If you are using 11g ORACLE_HOME for observer, note that it is incompatible with 10g databases.

  5. In the Oracle Net Services configuration, the listener.ora file needs to include a service with GLOBAL_DB_NAME, as follows, to enable the broker to automatically start the databases in the case of a switchover. This configuration is applicable on both servers. To set up the configuration, shut down the listener, make the changes, and restart the listener as follows:
      (SID_LIST =
       (SID_DESC =
       (SID_NAME = PLSExtProc)
        (ORACLE_HOME = /u01/home/oracle/product/11.2.0/db_1)
        (PROGRAM = extproc)
       )
     (SID_DESC =
        (GLOBAL_DBNAME = turkey_un_DGMGRL)
        (SID_NAME = TURKEY)
        (ORACLE_HOME = /u01/home/oracle/product/11.2.0/db_1)
       )
      )
    
  6. Setting the FastStartFailoverTarget value is required if there are multiple standby databases available in the Data Guard configuration. Use the following commands for the same:
    DGMGRL> edit database 'TURKEY_UN' SET PROPERTY FastStartFailoverTarget='INDIA_UN';
    Property "faststartfailovertarget" updated
    DGMGRL> edit database 'INDIA_UN' SET PROPERTY FastStartFailoverTarget='TURKEY_UN';
    Property "faststartfailovertarget" updated
    
  7. FSFO has two configuration properties. The FastStartFailoverLagLimit property refers to how much data loss is acceptable in terms of seconds. The FastStartFailoverThreshold property refers to the number of seconds for which the configuration will wait before initiating the failover process as follows:
    DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverLagLimit=30;
    Property "faststartfailoverlaglimit" updated
    DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold=30;
    Property "faststartfailoverthreshold" updated
    

    Tip

    If you want to change the fast-start failover target property to a different standby database, you have to disable FSFO, and then after changing the property, you have to re-enable FSFO.

  8. Enable fast-start failover as shown in the following command:
    DGMGRL> enable fast_start failover;
    Enabled.
    
  9. Assuming Oracle software is installed on the observer host, start observer. The following command must be issued on the observer server:
    $dgmgrl -logfile /tmp/obsvr.log sys/free2go@TURKEY "start observer" &
    

    Tip

    The previous command statement is executed in the background because the start observer command doesn't return the DGMGRL prompt to the user.

  10. Verify the FSFO configuration as follows:
    DGMGRL> SHOW FAST_START FAILOVER;
    Fast-Start Failover: ENABLED
      Threshold:        30 seconds
      Target:           INDIA_UN
      Observer:         oracle-ha
      Lag Limit:        30 seconds
      Shutdown Primary: TRUE
      Auto-reinstate:   TRUE
    Configurable Failover Conditions
      Health Conditions:
        Corrupted Controlfile          YES
        Corrupted Dictionary           YES
        Inaccessible Logfile            NO
        Stuck Archiver                  NO
        Datafile Offline               YES
      Oracle Error Conditions:
        (none)
    
    SQL> select DB_UNIQUE_NAME, FS_FAILOVER_STATUS, FS_FAILOVER_CURRENT_TARGET from v$database;
    DB_UNIQUE_NA FS_FAILOVER_STATUS     FS_FAILOVER_CURRENT_TARGET
    ------------ ---------------------- ------------------------------
    turkey_un    TARGET UNDER LAG LIMIT INDIA_UN
    

The FS_FAILOVER_STATUS value will be in "TARGET UNDER LAG LIMIT" if it is in the Maximum Performance mode, and in case it is in the Maximum Availability mode, the value will be SYNCHRONIZED.

What just happened?

We've just seen how to configure a fast-start failover after setting the required parameters, and also verified the status of the configuration after starting the observer.

Troubleshooting observer configuration

After configuring the observer, sometimes the process may be dropped and you may see errors in the configuration as shown later. In such a case, FSFO may not be able to initiate a failover in the case of primary database failure as follows:

ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database

For any troubleshooting issue, first look at the configuration status as follows:

DGMGRL> show configuration;
Configuration - PACKT
  Protection Mode: MaxPerformance
  Databases:
    TURKEY_UN - Primary database
      Warning: ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database

    INDIA_UN  - (*) Physical standby database
      Warning: ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database
Fast-Start Failover: ENABLED
Configuration Status: WARNING
2012-09-09 19:01:15.111 00000000  1269603843 Operation HEALTH_CHECK continuing with warning, status = ORA-16819
2012-09-09 19:01:15.112 00000000  1269603843 Operation HEALTH_CHECK continuing with warning, status = ORA-16819

Check for the status report of the configuration as follows:

DGMGRL> show database 'TURKEY_UN'  'StatusReport';
STATUS REPORT
       INSTANCE_NAME   SEVERITY ERROR_TEXT
                   *    WARNING ORA-16819: fast-start failover observer not started

As per the previous error, the observer is not running. The process may have been dropped or the observer system may have rebooted. Connect to the broker utility from the observer system using Oracle Net Services and start observer as follows:

$dgmgrl -logfile /tmp/obsvr.log sys/free2go@TURKEY "start observer" &

Check the configuration status as follows:

DGMGRL> SHOW FAST_START FAILOVER;
Fast-Start Failover: ENABLED
  Threshold:        30 seconds
  Target:           INDIA_UN
  Observer:         oracle-ha
  Lag Limit:        30 seconds
  Shutdown Primary: TRUE
  Auto-reinstate:   TRUE
Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES
  Oracle Error Conditions:
    (none)

Script to stop and start observer

To make the observer process highly available and running all the time, we may need to bounce the observer process when needed. So we can prepare a script and run it as a job regularly. It can be scheduled as an OS-level job. The following shell script example can be used on Linux/Unix systems:

# start and Stop Observer
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u01/home/oracle/product/11.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
dgmgrl << eof
connect sys/free2go@turkey
STOP OBSERVER;
START OBSERVER;
eof
..................Content has been hidden....................

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