STOP_OBSERVER

The STOP_OBSERVER function can be used to stop fast-start failover observers in a Data Guard broker configuration.

STOP_OBSERVER Function

DBMS_DG.STOP_OBSERVER (
     ob_name               IN VARCHAR2,
     severity              OUT BINARY_INTEGER)
RETURN BINARY_INTEGER;

Parameters

Parameter Description
ob_name A character string containing the name of the observer to be stopped. Valid values are:
  • An observer name. See V$FS_FAILOVER_OBSERVERS for a list of all registered observers.
  • NULL or the empty string if only one observer is registered.
  • ALL to stop all registered observers.
severity The severity associated with the status returned by this function. Severity will be one of the following Oracle error numbers:
  • ORA-0: normal, successful completion
  • ORA-16501: The Oracle Data Guard broker operation failed.
  • ORA-16502: The Oracle Data Guard broker operation succeeded with warnings.

Usage Notes

  • This function returns a binary integer.

  • You can call this function while connected to any database in the broker configuration.
  • This command does not disable fast-start failover, but a fast-start failover cannot be initiated in the absence of an observer.
  • Fast-start failover does not need to be enabled when you issue this command.
  • If fast-start failover is enabled when you call this function, then the primary and standby databases must be connected and communicating with each other. Otherwise the following error is returned:

    ORA-16636 fast-start failover target standby in error state, cannot stop observer

    If connectivity does not exist between the primary and standby databases, you can issue the disable fast-start failover with the FORCE option on the primary database and then call this function. Note that disabling fast-start failover with the FORCE option on a primary database that is disconnected from the observer and the target standby database does not prevent the observer from initiating a fast-start failover to the target standby database.

  • If fast-start failover is not enabled when you issue call this function, then only the primary database must be running when you stop the observer.
  • The observer does not stop immediately when you call this function. The observer does not discover it has been stopped until the next time the observer contacts the broker. As soon as you have called this function successfully, you can start an observer again on any computer. You can start a new observer right away, even if the old observer has not yet discovered it was stopped. Any attempt to restart the old observer will fail, because a new observer has been started for the broker configuration.
  • This function will return an error if a switch to a new fast-start failover target or new master observer is in progress.
  • This function will return an error if there are two or more registered observers and you attempt to stop only the master.

Return Values

Error Description
ORA-00000: normal, successful completion

The specified observer was successfully stopped.

Other

The Data Guard broker was unable to stop the specified observer and the return value will indicate the reason for this failure.