Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 2.75 KB

sys-fn-virtualservernodes-transact-sql.md

File metadata and controls

70 lines (51 loc) · 2.75 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.fn_virtualservernodes (Transact-SQL)
sys.fn_virtualservernodes (Transact-SQL)
rwestMSFT
randolphwest
03/14/2017
sql
system-objects
reference
fn_virtualservernodes
fn_virtualservernodes_TSQL
nodes [Faillover Clustering], virtual servers
nodes [Faillover Clustering]
virtual servers [Faillover Clustering]
failover clustering [SQL Server], nodes
fn_virtualservernodes function
sys.fn_virtualservernodes function
TSQL
>=aps-pdw-2016||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

sys.fn_virtualservernodes (Transact-SQL)

[!INCLUDE sql-asdbmi-pdw]

Returns a list of failover clustered instance nodes on which an instance of [!INCLUDEssNoVersion] can run. This information is useful in failover clustering environments.

Important

This [!INCLUDEmsCoName] [!INCLUDEssSQL11] system function is included for backward compatibility. We recommend that you use sys.dm_os_cluster_nodes (Transact-SQL) instead.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

  
fn_virtualservernodes()  

Tables Returned

If the current server is a clustered server, fn_virtualservernodes returns a list of failover clustered instance nodes on which this instance of [!INCLUDEssNoVersion] has been defined.

If the current server instance is not a clustered server, fn_virtualservernodes returns an empty rowset.

Permissions

The user must have VIEW SERVER STATE permission for the instance of [!INCLUDEssNoVersion].

Examples

The following example uses fn_virtualservernodes to query on a clustered server instance:

SELECT * FROM fn_virtualservernodes();  

[!INCLUDEssResult]

NodeName

--------

SS3-CLUSN1

SS3-CLUSN2

See Also

sys.dm_os_cluster_nodes (Transact-SQL)
sys.fn_servershareddrives (Transact-SQL)