Редактиране

Споделяне чрез


sys.fn_virtualservernodes (Transact-SQL)

Applies to: SQL Server Azure SQL Managed Instance Analytics Platform System (PDW)

Returns a list of failover clustered instance nodes on which an instance of SQL Server can run. This information is useful in failover clustering environments.

Important

This Microsoft SQL Server 2012 (11.x) system function is included for backward compatibility. We recommend that you use sys.dm_os_cluster_nodes (Transact-SQL) instead.

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 SQL Server 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 SQL Server.

Examples

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

SELECT * FROM fn_virtualservernodes();  

Here's the result set.

NodeName

--------

SS3-CLUSN1

SS3-CLUSN2

See Also

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