[AlwaysOn] T-SQL語法:REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT引數

cow977發表於2019-08-15

REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT

在SQL Server 2017中引入。Introduced in SQL Server 2017.

用於設定在主提交事務之前提交所需的最小同步輔助副本數。Used to set a minimum number of synchronous secondary replicas required to commit before the primary commits a transaction. 確保SQL Server事務在事務日誌更新到最小輔助副本數之前一直處於等待狀態。Guarantees that SQL Server transaction waits until the transaction logs are updated on the minimum number of secondary replicas. 預設值為0,其行為與SQL Server 2016相同。The default is 0 which gives the same behavior as SQL Server 2016. 最小值為0。The minimum value is 0. 最大值是複製副本數減去1。The maximum value is the number of replicas minus 1. 此選項與同步提交模式下的副本相關。This option relates to replicas in synchronous commit mode. 當副本處於同步提交模式時,主副本上的寫入操作將等待,直到輔助同步副本上的寫入操作提交到副本資料庫事務日誌。When replicas are in synchronous commit mode, writes on the primary replica wait until writes on the secondary synchronous replicas are committed to the replica database transaction log. 如果承載輔助同步副本的SQL伺服器停止響應,則承載主副本的SQL伺服器會將該輔助副本標記為未同步並繼續。If a SQL Server that hosts a secondary synchronous replica stops responding, the SQL Server that hosts the primary replica marks that secondary replica as NOT SYNCHRONIZED and proceed. 當沒有響應的資料庫重新聯機時,它處於“未同步”狀態,並且複製副本標記為不健康,直到主資料庫可以使其再次同步。When the unresponsive database comes back online it is in a "not synced" state and the replica marked as unhealthy until the primary can make it synchronous again. 此設定確保主副本在提交每個事務的最小副本數之前一直等待。This setting guarantees that the primary replica waits until the minimum number of replicas have committed each transaction. 如果最小副本數不可用,則在主副本提交失敗時提交。If the minimum number of replicas is not available then commits on the primary fail. 對於外部群集型別,當可用性組新增到群集資源時,設定將更改。For cluster type EXTERNAL the setting is changed when the availability group is added to a cluster resource. 有關可用性組配置,請參閱高可用性和資料保護。See .


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

相關文章