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

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/81227/viewspace-2654024/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值