[AlwaysOn] 创建SQL Server高可用性组T-SQL语法:FAILOVER_MODE参数

FAILOVER_MODE = { AUTOMATIC | MANUAL }

指定要定义的可用性副本的故障转移模式。Specifies the failover mode of the availability replica that you are defining.

自动 AUTOMATIC

启用自动故障转移。Enables automatic failover. 只有当您还指定了可用性模式为同步提交模式时,才支持此选项。This option is supported only if you also specify AVAILABILITY_MODE = SYNCHRONOUS_COMMIT. 可以为两个可用性副本(包括主副本)指定自动。You can specify AUTOMATIC for two availability replicas, including the primary replica.

注释 Note

SQL Server 故障转移群集实例(FCI)不支持按可用性组进行自动故障转移,因此只能为手动故障转移配置由FCI承载的任何可用性副本。SQL Server Failover Cluster Instances (FCIs) do not support automatic failover by availability groups, so any availability replica that is hosted by an FCI can only be configured for manual failover.

手动 MANUAL

启用数据库管理员计划的手动故障转移或强制的手动故障转移(通常称为强制故障转移)。Enables planned manual failover or forced manual failover (typically called forced failover) by the database administrator.

FAILOVER_MODE 子句是必需的。The FAILOVER_MODE clause is required. 在不同的条件下,支持两种类型的手动故障转移:不丢失数据的手动故障转移和强制故障转移(可能丢失数据)。The two types of manual failover, manual failover without data loss and forced failover (with possible data loss), are supported under different conditions. 有关详细信息,请参阅故障转移和故障转移模式(始终在可用性组上)。For more information, see Failover and Failover Modes (Always On Availability Groups).