[AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AVAILABILITY_MODE引數

cow977發表於2019-08-18

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 .

AVAILABILITY_MODE 子句是必需的。The AVAILABILITY_MODE clause is required.有關詳細資訊,請參閱可用性模式(始終在可用性組上)。For more information, see .


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-2654024/,如需轉載,請註明出處,否則將追究法律責任。

相關文章