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.
- 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
- Configure the primary and standby databases to receive redo via
SYNCorFASTSYNCorASYNCmode, 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 viaSYNCorFASTSYNCmode and configure the database to receive redo viaASYNCmode. 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.
- If you have two or more standby databases, set up the
FastStartFailoverTargetconfiguration 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".
- If it is necessary to upgrade the protection mode, use the following DGMGRL
EDIT CONFIGURATIONcommand. For example:DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
- 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_TARGETinitialization parameter is set to a sufficiently large value so that reinstatement is still possible after a prolonged outage. - Start up to four observers by logging into the observer
computers and using DGMGRL. Connect to the configuration as a user with
SYSDGorSYSDBAprivilege and issue theSTART OBSERVERcommand. This command will run in the foreground and not return toDGMGRL>prompt unless theIN BACKGROUNDclause 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 theIN BACKGROUNDclause.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
ObserverConnectIdentiferorDGConnectIdentifierdatabase 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.
- 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.
- Verify the fast-start failover configuration. Use the
SHOW FAST_START FAILOVERcommand 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
FastStartFailoverTargetproperty is set up reciprocally once fast-start failover is enabled. The first command, issued for the current primary databaseNorth_Sales, shows the value of theFastStartFailoverTargetproperty to be the current target standby,South_Sales. The second command, issued for the target standbySouth_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';