Role Switching and Failover
To trigger manual failover of the AdventureMirror database, execute the following statement on the principal instance:
USE master; ALTER DATABASE AdventureMirror SET PARTNER FAILOVER;
Automatic failover can occur under the following conditions:
- The mirroring session is configured for high-safety mode and has a witness.
- The mirror is in a synchronised state.
- The principal instance is unavailable while the mirror and witness instances retain quorum.
If all instances lose communication, automatic failover will not occur even if the witness and the mirror reestablish communication.
Configuring forced service switchover on the AdventureMirror database, connect to the mirror instance and execute the following statement:
USE master; ALTER DATABASE AdventureMirror SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS;