SET MASTEROBSERVER TO
The SET MASTEROBSERVER TO command lets you manually change which observer is recognized as the master observer.
Use the SET MASTEROBSERVER TO command to manually designate which observer is to be used as the master.
Format
SET MASTEROBSERVER TO <observer_name>
Usage Notes
-
If the specified observer name does not exist, an error message is returned and the master observer is not changed
-
When this command is issued, the actual switch does not happen until the next time the primary contacts the target standby, usually within three seconds if fast-start failover is enabled. You should use the
SHOW OBSERVERcommand to verify that the switch took place. -
For the manual setting to succeed, the following conditions must be met during the next fast-start failover ping:
-
The target standby is enabled and does not require reinstatement.
-
There is no role change, reinstating, or fast-start failover target switch in progress
-
- If the property
PreferredObserverHostsis set to use priorities and you try to promote an observer with a lower priority, the change will be immediately reverted. In this case, instead of usingSET MASTEROBSERVER TO, modify thePreferredObserverHostsproperty to give higher priority to the observer you want to promote.
Command Example
The following is an example of designating a new observer to be the master.
DGMGRL> SET MASTEROBSERVER TO boston-obsever;
Succeeded.