ITPub博客

首页 > 数据库 > SQL Server > [AlwaysOn] 创建SQL Server高可用性组T-SQL语法:AVAILABILITY_MODE参数

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

原创 SQL Server 作者:cow977 时间:2019-08-18 07:48:32 0 删除 编辑

AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT | CONFIGURATION_ONLY }

同步提交或异步提交指定在主副本可以提交给定主数据库上的事务之前,主副本是否必须等待辅助副本确认将日志记录硬化(写入)到磁盘。SYNCHRONOUS_COMMIT or ASYNCHRONOUS_COMMIT specifies whether the primary replica has to wait for the secondary replica to acknowledge the hardening (writing) of the log records to disk before the primary replica can commit the transaction on a given primary database. 同一主副本上不同数据库上的事务可以独立提交。The transactions on different databases on the same primary replica can commit independently. SQL Server 2017 CU 1引入仅配置选项。SQL Server 2017 CU 1 introduces CONFIGURATION_ONLY.仅配置副本仅适用于群集类型为“外部”或“无”的可用性组。CONFIGURATION_ONLY replica only applies to availability groups with CLUSTER_TYPE = EXTERNAL or CLUSTER_TYPE = NONE.

同步提交 SYNCHRONOUS_COMMIT

指定主副本等待提交事务,直到在此次副本(同步提交模式)上对它们进行了固化。Specifies that the primary replica waits to commit transactions until they have been hardened on this secondary replica (synchronous-commit mode). 您可以为最多三个副本(包括主副本)指定同步提交。You can specify SYNCHRONOUS_COMMIT for up to three replicas, including the primary replica.

异步提交 ASYNCHRONOUS_COMMIT

指定主副本提交事务而不等待辅助副本固化日志(同步提交可用性模式)。Specifies that the primary replica commits transactions without waiting for this secondary replica to harden the log (synchronous-commit availability mode). 您可以为最多五个可用性副本(包括主副本)指定异步提交。You can specify ASYNCHRONOUS_COMMIT for up to five availability replicas, including the primary replica.

CONFIGURATION_ONLY

指定主副本将可用性组配置元数据同步提交到此副本上的主数据库。Specifies that the primary replica synchronously commit availability group configuration metadata to the master database on this replica. 副本将不包含用户数据。The replica will not contain user data. 此选项:This option:

l   可以托管在任何版本的SQL Server上,包括Express版本。Can be hosted on any edition of SQL Server, including Express Edition.

l   要求配置唯一副本的数据镜像终结点为见证类型。Requires the data mirroring endpoint of the CONFIGURATION_ONLY replica to be type WITNESS.

l   不能更改。Can not be altered.

l   当集群类型为WSFC时无效。Is not valid when CLUSTER_TYPE = WSFC.

有关详细信息,请参阅仅配置副本。For more information, see Configuration only replica.

AVAILABILITY_MODE 子句是必需的。The AVAILABILITY_MODE clause is required.有关详细信息,请参阅可用性模式(始终在可用性组上)。For more information, see Availability Modes (Always On Availability Groups).


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/81227/viewspace-2654024/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-03-02

  • 博文量
    686
  • 访问量
    735593