sys.dm_hadr_cluster (Transact-SQL)sys.dm_hadr_cluster (Transact-SQL)

適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions) 適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions)

如果裝載已啟用之實例的 Windows Server 容錯移轉叢集 (WSFC) 節點 SQL ServerSQL Server Always On 可用性群組Always On availability groups 具有 WSFC 仲裁, sys.dm_hadr_cluster 會傳回一個資料列,該資料列會公開叢集名稱以及有關仲裁的資訊。If the Windows Server Failover Clustering (WSFC) node that hosts an instance of SQL ServerSQL Server that is enabled for Always On 可用性群組Always On availability groups has WSFC quorum, sys.dm_hadr_cluster returns a row that exposes the cluster name and information about the quorum. 如果 WSFC 節點沒有仲裁,則不傳回任何資料列。If the WSFC node has no quorum, no row is returned.

提示

從開始 SQL Server 2014 (12.x)SQL Server 2014 (12.x) ,這個動態管理檢視除了 Always On 可用性群組之外,還支援 Always On 容錯移轉叢集實例。Beginning in SQL Server 2014 (12.x)SQL Server 2014 (12.x), this dynamic management view supports Always On Failover Cluster Instances in addition to Always On Availability Groups.

資料行名稱Column name 資料類型Data type 描述Description
cluster_namecluster_name nvarchar(128)nvarchar(128) WSFC 叢集的名稱,該叢集會裝載啟用 SQL ServerSQL ServerAlways On 可用性群組Always On availability groups 執行個體。Name of the WSFC cluster that hosts the instances of SQL ServerSQL Server that are enabled for Always On 可用性群組Always On availability groups.
quorum_typequorum_type tinyinttinyint 這個 WSFC 叢集所使用的仲裁類型,可為下列其中一個值:Type of quorum used by this WSFC cluster, one of:

0 = 節點多數。0 = Node Majority. 此仲裁設定可維持一半節點的失敗數 (四捨五入) 減一。This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 例如,在七個節點的叢集上,這個仲裁設定可以維持三個節點失敗數。For example, on a seven node cluster, this quorum configuration can sustain three node failures.

1 = 節點與磁碟多數。1 = Node and Disk Majority. 如果磁碟見證依然在線上,此仲裁設定可維持一半節點的失敗數 (四捨五入)。If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 例如,如果在六個節點的叢集中,有磁碟見證處於線上,則可維持三個節點失敗數。For example, a six node cluster in which the disk witness is online could sustain three node failures. 如果磁碟見證離線或失敗,此仲裁設定可維持一半節點的失敗數 (四捨五入) 減一。If the disk witness goes offline or fails, this quorum configuration can sustain failures of half the nodes (rounding up) minus one. 例如,如果在六個節點的叢集中,有失敗的磁碟見證,則可維持兩個節點 (3-1=2) 失敗數。For example, a six node cluster with a failed disk witness could sustain two (3-1=2) node failures.

2 = 節點與檔案共用多數。2 = Node and File Share Majority. 此仲裁設定的運作方式類似於「節點與磁碟多數」,但是會使用檔案共用見證,而非磁碟見證。This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness.

3 = 無多數,僅限磁碟。3 = No Majority: Disk Only. 如果仲裁磁碟在線上,此仲裁設定可維持所有節點的失敗數,除了一以外。If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one.

4 = 未知的仲裁。4 = Unknown Quorum. 叢集的未知仲裁。Unknown Quorum for the cluster.

5 = 雲端見證。5 = Cloud Witness. 叢集會利用仲裁仲裁的 Microsoft Azure。Cluster utilizes Microsoft Azure for quorum arbitration. 如果有可用的雲端見證,叢集可以承受一半節點的失敗 (進位) 。If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up).
quorum_type_descquorum_type_desc varchar(50)varchar(50) Quorum_type 的描述,下列其中一個:Description of quorum_type, one of:

NODE_MAJORITYNODE_MAJORITY

NODE_AND_DISK_MAJORITYNODE_AND_DISK_MAJORITY

NODE_AND_FILE_SHARE_MAJORITYNODE_AND_FILE_SHARE_MAJORITY

NO_MAJORITY:_DISK_ONLYNO_MAJORITY:_DISK_ONLY

UNKNOWN_QUORUMUNKNOWN_QUORUM

CLOUD_WITNESSCLOUD_WITNESS
quorum_statequorum_state tinyinttinyint WSFC 仲裁的狀態,下列其中一個值:State of the WSFC quorum, one of:

0 = 未知仲裁狀態0 = Unknown quorum state

1 = 正常仲裁1 = Normal quorum

2 = 強制仲裁2 = Forced quorum
quorum_state_descquorum_state_desc varchar(50)varchar(50) Quorum_state 的描述,下列其中一個:Description of quorum_state, one of:

UNKNOWN_QUORUM_STATEUNKNOWN_QUORUM_STATE

NORMAL_QUORUMNORMAL_QUORUM

FORCED_QUORUMFORCED_QUORUM

權限Permissions

需要伺服器的 VIEW SERVER STATE 權限。Requires VIEW SERVER STATE permission on the server.

另請參閱See Also

Always On 可用性群組動態管理檢視和函數 (Transact-sql) Always On Availability Groups Dynamic Management Views and Functions (Transact-SQL)
AlwaysOn 可用性群組目錄檢視 (Transact-SQL) Always On Availability Groups Catalog Views (Transact-SQL)
監視可用性群組 (Transact-sql) Monitor Availability Groups (Transact-SQL)
sys.dm_hadr_cluster_members (Transact-SQL)sys.dm_hadr_cluster_members (Transact-SQL)