dg_configure_fsfo

Configures Data Guard fast-start failover between the specified primary and standby databases.

Note:

The Enterprise Manager alternate observer feature is not supported for database version 12.2 and higher. Instead, the Data Guard broker multiple observer capability should be used. If an alternate observer was configured for these versions, it should be removed using the following EMCLI command:
"emcli dg_configure_observers -delete_alternate_observer "

Format

emcli dg_configure_fsfo
      -operation= "enable | disable | edit"
      -primary_target_name=""
      -primary_target_type="oracle_database|rac_database"
      -standby_target_name=""
      -standby_target_type="oracle_database|rac_database"
      [-observer_host_name=""]
      [-observer_oracle_home=""]
      [-observer_host_cred_name=""]
      [-alternate_observer_host_name=""]
      [-alternate_observer_oracle_home=""]
      [-alternate_observer_host_cred_name=""]
      [-failover_threshold=""]
      [-lag_limit=""]
      [-failover_conditions=""]
      [-auto_reinstate_primary="Yes|No"]
      [-auto_shutdown_primary="Yes|No"]
      [-primary_db_creds_name=""]
      [-primary_host_creds_name=""]
      [-standby_db_creds_name=""]
      [-standby_host_creds_name=""]
      [-primary_gi_host_creds_name=""]
      [-standby_gi_host_creds_name=""]
      (
          [-enable_flashback_database="Yes|No"]
          [-primary_fast_recovery_area="<primary database fast recovery area>"]
          [-standby_fast_recovery_area="<standby database fast recovery area>"]
      )	      
[ ]  indicates that the parameter is optional.

Options

  • operation: Operation to be performed on the fast-start failover, as follows:
    • enable: enable fast-start failover.
    • disable: disable fast-start failover and stop the observer.
    • edit: Make changes to the fast-start failover configuration currently in place for the specified primary database. You can change the fast-start failover designated standby database, adjust the thresholds or configure a new observer by specifying a new observer host. If you change the observer host and/or oracle home location, the current observer will be stopped and a new one started with the new location. However, if the observer host or Oracle home location is not changed, there will be no change to the state of the already configured observer.
  • primary_target_name: Primary database Enterprise Manager target name. Can be either a single-instance database or a cluster database.
  • primary_target_type: Primary database target type. Specify oracle_database for single instance, or rac_database for cluster.
  • standby_target_name: Standby database Enterprise Manager target name. Can be either a single-instance database or a cluster database.
  • standby_target_type: Standby database target type. Specify oracle_database for single instance, or rac_database for cluster.
  • primary_db_cred_name: Primary database named credential for a user with SYSDBA or SYSDG role. Default is to use preferred credential.
  • primary_host_cred_name: Primary database host named credential for an operating system user who can access the primary database Oracle home. Default is to use preferred credential.
  • standby_db_cred_name: Standby database named credential for a user with SYSDBA or SYSDG role. Default is to use preferred credential.
  • standby_host_cred_name: Standby database host named credential for an operating system user who can access the standby database Oracle home. Default is to use preferred credential.
  • observer_host_name: Discovered host where Enterprise Manager will start the observer. Default is none.
  • observer_oracle_home: Oracle home on the observer host, if specified Default is none.
  • observer_host_cred_name: Observer host named credential for an operating system user who can access the observer Oracle home.
  • alternate_observer_host_name: Discovered host where Enterprise Manager will start the alternate observer if the main observer becomes inaccessible and cannot be restarted. Default is none.
  • alternate_observer_oracle_home: Oracle home on the alternate observer host, if specified, where Enterprise Manager will start the alternate observer if necessary. Default is none.
  • alternate_observer_host_cred_name: Alternate observer host named credential for an operating system user who can access the alternate observer Oracle home.
  • failover_threshold: Amount of time in seconds the primary database must be out of contact with the observer and the standby database before a fast-start failover is initiated. Default is 30 seconds.
  • lag_limit: Amount of time in seconds the standby database is allowed to fall behind the primary database, beyond which a fast-start failover will not be allowed. Default is 30 seconds.
  • failover_conditions: A comma separated list of failover conditions, that if detected on the primary database, trigger a fast-start failover.
    • 1: Corrupted Controlfile
    • 2: Corrupted Dictionary
    • 3: Inaccessible Logfile
    • 4: Stuck Archiver
    • 5: Datafile Write Errors

    Note:

    Default is 1, 2, 5
  • auto_reinstate_primary: Controls whether the observer will automatically reinstate the former primary database once contact is re-established after the former primary database is restarted. Does not control reinstate behavior for failovers caused by an error condition. Default is yes.
  • auto_shutdown_primary: Controls whether the primary database will shut itself down if it independently discerns that a fast-start failover may have occurred, but cannot verify it due to network isolation from the observer and the standby database. Does not control shutdown behavior for failovers caused by an error condition. Default is yes.
  • primary_gi_host_creds_name: Grid Infrastructure named credentials for an operating system user who can access the grid infrastructure Oracle home of the Primary Database.
  • standby_gi_host_creds_name: Grid Infrastructure named credentials for an operating system user who can access the grid infrastructure Oracle home of the Standby Database.
  • enable_flashback_database: Flashback logging will be enabled on the primary and standby databases. Flashback database is required to reinstate the old primary database after a failover.

    Enabling flashback for database versions 12.2 and above while configuring fast-start failover is optional.

    This option is supported only for "enable"|"edit" operation.

    Default Value: "Yes" for database versions lower than 12.2 and "No" for database versions 12.2 and greater.

    Allowed Value: Yes or No

  • primary_database_fast_recovery_area: Specifies the default storage area where archived redo log files (and other recovery-related files) reside on the primary database.

    This input will be considered only when the fast recovery area is not already set and when flashback must be enabled.

    This option is supported only for "enable"|"edit" operation.

    Default Value: <oracle_base>/fast_recovery_area

    Default Value of fast recovery area size will be set to twice the database size.

  • standby_database_fast_recovery_area: Specifies the default storage area where archived redo log files (and other recovery-related files) reside on the standby database.

    This input will be considered only when the fast recovery area is not already set and when flashback must be enabled.

    This option is supported only for "enable"|"edit" operation.

    Default Value: <oracle_base>/fast_recovery_area

    Default Value of fast recovery area size will be set to twice the database size.

Examples

Example 1

The following example enables a fast-start failover where the primary target is a single-instance database named "dbprimary" and the standby target is a single-instance database named "dbstandby", with no automatic reinstatement of the former primary database when contact is re-established.

emcli dg_configure_fsfo
      -operation="enable"
      -primary_target_name="dbprimary"
      -primary_target_type="oracle_database"
      -standby_target_name="dbstandby"
      -standby_target_type="oracle_database"
      -auto_reinstate_primary="no"

Example 2

The following example disables a fast-start failover for the primary single-instance database named "database" and the standby single-instance database named "database1".

emcli dg_configure_fsfo
      -operation="disable"
      -primary_target_name="database"
      -primary_target_type="oracle_database"
      -standby_target_name="database1"
      -standby_target_type="oracle_database"

Example 3

The following example edits a fast-start failover for the primary target single-instance database named "dbprimary", changing the standby target to a single-instance database named "dbalternate". It also changes the lag limit to 60 seconds and the failover threshold to 40 seconds.

emcli dg_configure_fsfo
      -operation="edit"
      -primary_target_name="dbprimary"
      -primary_target_type="oracle_database"
      -standby_target_name="dbalternate"
      -standby_target_type="oracle_database"
      -lag_limit="60"
      -failover_threshold="40"

Example 4

The following example enables the fast-start-failover for the primary single-instance database named "database" and the standby single-instance database named "database1". It also creates the observer on the specified host and Oracle home. It also specifies that the primary should not be automatically reinstated and shutdown."

emcli dg_configure_fsfo
      -operation="enable"
      -primary_target_name="database"
      -primary_target_type="oracle_database"
      -standby_target_name="database1"
      -standby_target_type="oracle_database"
      -observer_host_name="observer_host_name"
      -observer_oracle_home="observer_oracle_home"
      -observer_host_cred_name="observer_host_cred_name"
      -auto_reinstate_primary="No"
      -auto_shutdown_primary="No"
      -failover_conditions="1,2,5"
      -failover_threshold="90"