SQL Server › Always On Availability Groups
What is the difference between automatic failover and manual failover in an Always On Availability Group?
IntermediateAnswer
Automatic failover happens without any human intervention when a properly configured synchronous secondary replica detects that the primary has failed, immediately promoting itself to become the new primary, while manual failover requires an administrator to explicitly trigger the switch, which is often used for planned maintenance rather than emergencies.
-- Automatic failover requires synchronous commit mode
-- and a configured availability group listener
ALTER AVAILABILITY GROUP MyAG
MODIFY REPLICA ON 'ServerB' WITH (FAILOVER_MODE = AUTOMATIC);Real-world example A hospital's patient record system relies on automatic failover so that if the primary database server crashes unexpectedly in the middle of the night, the system recovers on its own without waiting for an administrator to respond.