Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 3.16 KB

sys-dm-hadr-instance-node-map-transact-sql.md

File metadata and controls

53 lines (41 loc) · 3.16 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sys.dm_hadr_instance_node_map (Transact-SQL)
Returns the name of the Windows Server Failover Cluster node that hosts the server instance.
rwestMSFT
randolphwest
10/17/2023
sql
system-objects
reference
sys.sys.dm_hadr_instance_node_map_TSQL
sys.sys.dm_hadr_instance_node_map
sys.dm_hadr_instance_node_map_TSQL
sys.dm_hadr_instance_node_map
Availability Groups [SQL Server], monitoring
Availability Groups [SQL Server], WSFC
sys.sys.dm_hadr_instance_node_map dynamic management view
TSQL

sys.dm_hadr_instance_node_map (Transact-SQL)

[!INCLUDE SQL Server]

For every instance of [!INCLUDE ssNoVersion] that hosts an availability replica that is joined to its Always On availability group, returns the name of the Windows Server Failover Cluster (WSFC) node that hosts the server instance. This dynamic management view has the following uses:

  • This dynamic management view is useful for detecting an availability group with multiple availability replicas that are hosted on the same WSFC node, which is an unsupported configuration that could occur after an failover cluster instance (FCI) failover if the availability group is incorrectly configured. For more information, see Failover Clustering and Always On Availability Groups (SQL Server).

  • When multiple SQL Server instances are hosted on the same WSFC node, the Resource DLL uses this dynamic management view to determine the instance of [!INCLUDE ssNoVersion] to connect to.

Column name Data type Description
ag_resource_id nvarchar(256) Unique ID of the availability group as a resource in the WSFC.
instance_name nvarchar(256) Name-<server>/<instance>-of a server instance that hosts a replica for the availability group.
node_name nvarchar(256) Name of the WSFC node.

Remarks

[!INCLUDE dmv-cluster-column-display]

Permissions

For [!INCLUDE sssql19-md] and previous versions, requires VIEW SERVER STATE permission on the server.

For [!INCLUDE sssql22-md] and later versions, requires VIEW SERVER PERFORMANCE STATE permission on the server.

Related content