sys.dm_hadr_name_id_map (Transact-SQL)sys.dm_hadr_name_id_map (Transact-SQL)

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

顯示目前實例 SQL ServerSQL Server 已聯結至三個唯一識別碼的 Always On 可用性群組對應:可用性群組識別碼、wsfc 資源識別碼和 Wsfc 群組識別碼。Shows the mapping of Always On availability groups that the current instance of SQL ServerSQL Server has joined to three unique IDs: an availability group ID, a WSFC resource ID, and a WSFC Group ID. 此對應的目的是要處理重新命名 WSFC 資源/群組的案例。The purpose of this mapping is to handle the scenario in which the WSFC resource/group is renamed.

資料行名稱Column name 資料類型Data type 描述Description
ag_nameag_name nvarchar(256)nvarchar(256) 可用性群組的名稱。Name of the availability group. 這是使用者指定的名稱,它在 Windows Server 容錯移轉叢集 (WSFC) 叢集內必須是唯一的。This is a user-specified name that must be unique within the Windows Server Failover Cluster (WSFC) cluster.
ag_idag_id uniqueidentifieruniqueidentifier 可用性群組的唯一識別碼 (GUID)。Unique identifier (GUID) of the availability group.
ag_resource_idag_resource_id nvarchar(256)nvarchar(256) 在 WSFC 叢集中做為資源之可用性群組的唯一識別碼。Unique ID of the availability group as a resource in the WSFC cluster.
ag_group_idag_group_id nvarchar(256)nvarchar(256) 可用性群組的唯一 WSFC 群組識別碼。Unique WSFC Group ID of the availability group.

權限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)
AlwaysOn 可用性群組 (SQL Server)Always On Availability Groups (SQL Server)