SET_STATE_APPLY_ON

The SET_STATE_APPLY_ON function can be used to set the apply state to on for a logical or physical standby database.

SET_STATE_APPLY_ON Function

DBMS_DG.SET_STATE_APPLY_ON (
     member_name           IN VARCHAR2,
     apply_instance        IN VARCHAR2 DEFAULT NULL,
     severity              OUT BINARY_INTEGER)
RETURN BINARY_INTEGER;

Parameters

Parameter Description
member_name The DB_UNIQUE_NAME initialization parameter value of the standby database whose apply state should be set to ON.
apply_instance A character string containing the SID of the instance you want to become the apply instance if this is an Oracle RAC standby database.
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.

  • The apply state for a snapshot standby database cannot be set to ON.
  • If the apply_instance argument is specified, that instance will become the apply instance.
  • All instances of an Oracle RAC database are affected by this database state change.

Return Values

Error Description
ORA-00000: normal, successful completion

The apply state for the specified standby database was successfully set to ON.

Other

The Data Guard broker was unable to set the apply state to ON for the specified standby database and the return value will indicate the reason for this failure.