Scenario 6: Enabling Fast-Start Failover and Starting the Observer

You can enable fast-start failover from any site, including the observer site, while connected to any database in the broker configuration.

Enabling fast-start failover does not trigger a failover. Instead, it allows the observer that is monitoring the configuration to initiate a fast-start failover if conditions warrant a failover. This section describes the steps to enable fast-start failover and start the observer where the configuration protection mode is set to maximum availability mode.

  1. Ensure standby redo logs are configured on the primary and target standby databases. You must stop log apply services prior to configuring standby redo logs.

    See Also:

    Oracle Data Guard Concepts and Administration for instructions on configuring standby redo log files

  2. Configure the primary and standby databases to receive redo via SYNC or FASTSYNC or ASYNC mode, if they receive redo directly rather than via a far sync instance. If either database receives redo via a far sync instance, then configure the far sync instance to receive redo via SYNC or FASTSYNC mode and configure the database to receive redo via ASYNC mode. For example:
    DGMGRL> EDIT DATABASE 'North_Sales' SET PROPERTY 'logXptMode'='SYNC';
    Property "logXptMode" updated for member "North_Sales".
    
    DGMGRL> 'South_Sales' SET PROPERTY 'logXptMode'='SYNC';
    Property "logXptMode" updated for member "South_Sales".
    

    The broker does not allow these commands to succeed unless the databases are configured with standby redo log files.

  3. If you have two or more standby databases, set up the FastStartFailoverTarget configuration property on the primary database to indicate the desired target standby database. The broker reciprocally sets this property for the target standby database to indicate the primary database as its future target standby database when fast-start failover is actually enabled. There is no need for you set this property on the target standby as this is done for you automatically. For example:
    DGMGRL> EDIT DATABASE 'North_Sales' SET PROPERTY FastStartFailoverTarget='South_Sales';
    Property "faststartfailovertarget" updated for member "North_Sales".
    
  4. If it is necessary to upgrade the protection mode, use the following DGMGRL EDIT CONFIGURATION command. For example:
    DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
    
  5. If it is not already enabled on the primary and standby databases, enable Flashback Database by issuing the following statements on each database. Stop Redo Apply before enabling Flashback Database and restart it after Flashback Database has been enabled:
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    [include the existing commands]
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
    

    Ensure that the DB_FLASHBACK_RETENTION_TARGET initialization parameter is set to a sufficiently large value so that reinstatement is still possible after a prolonged outage.

  6. Start up to four observers by logging into the observer computers and using DGMGRL. Connect to the configuration as a user with SYSDG or SYSDBA privilege and issue the START OBSERVER command. This command will run in the foreground and not return to DGMGRL> prompt unless the IN BACKGROUND clause is included. Wallet-based authentication with credentials that match the connect identifier used to start the observer must be configured when starting an observer as a background process using the IN BACKGROUND clause.
    DGMGRL> CONNECT sys@north_sales
    Password: password
    Connected to "North_Sales"
    Connected as SYSDBA.
    DGMGRL> START OBSERVER observer1 IN BACKGROUND CONNECT IDENTIFIER IS north_sales;
    Submitted command “START OBSERVER” using connect identifier “north_sales”
    

    Oracle recommends using this command format for security reasons; no credentials are visible. This practice prevents other users on the system from using a utility (for example, the UNIX ps utility) to display connection credentials. It also prevents clear-text passwords from being visible on the user's terminal.

    When starting the observer from a script, Oracle recommends that you use a method that supports 'connect /', so that database connection credentials do not have to be embedded within the script. If you choose to use a client-side Oracle Wallet as a secure external password store, be sure to add credentials for both the primary and fast-start failover target standby databases. The database connect string that you specify when adding the credentials for each database must match the ObserverConnectIdentifer or DGConnectIdentifier database property.

    Note:

    Enterprise User Security (EUS) is deprecated with Oracle AI Database 26ai. Oracle recommends using Centrally Managed Users (CMU) instead.

    When multiple observers are started, one observer is the master observer after fast-start failover is enabled, and the remaining observers are backup observers. Only the master observer can coordinate fast-start failover with Data Guard broker. If the primary and target standby databases stay connected but the connection to the master observer is lost, then the broker tries to nominate a backup observer as the new master observer.

  7. Enable fast-start failover. You can enable fast-start failover while connected to any database system in the broker configuration. For example:
    DGMGRL> ENABLE FAST_START FAILOVER;
    Enabled in Zero Data Loss Mode.
  8. Verify the fast-start failover configuration. Use the SHOW FAST_START FAILOVER command to display the fast-start failover settings:
    DGMGRL> SHOW FAST_START FAILOVER
    
    Fast-Start Failover: Enabled in Zero Data Loss Mode
    
      Protection Mode:    MaxAvailability
      Lag Limit:          0 seconds
    
      Threshold:          30 seconds
      Ping Interval:      3000 milliseconds
      Ping Retry:         0 
      Active Target:      South_Sales
      Potential Targets:  "South_Sales"
        South_Sales valid
      Observer:           (none)
      Shutdown Primary:   TRUE
      Auto-reinstate:     TRUE
      Observer Reconnect: (none)
      Observer Override:  FALSE
    
    Configurable Failover Conditions
      Health Conditions:
        Corrupted Controlfile          YES
        Corrupted Dictionary           YES
        Inaccessible Logfile            NO
        Stuck Archiver                  NO
        Datafile Write Errors          YES
    
      Oracle Error Conditions:
        (none)
    

    The following commands show that the FastStartFailoverTarget property is set up reciprocally once fast-start failover is enabled. The first command, issued for the current primary database North_Sales, shows the value of the FastStartFailoverTarget property to be the current target standby, South_Sales. The second command, issued for the target standby South_Sales, shows the current primary, North_Sales, as the target standby's future target standby should it ever take over as a primary.

    DGMGRL> SHOW DATABASE 'North_Sales' FastStartFailoverTarget;
     FastStartFailoverTarget='South_Sales';
     
    DGMGRL> SHOW DATABASE 'South_Sales' FastStartFailoverTarget;
     FastStartFailoverTarget='North_Sales';