Home > SQL Server > Get SQL Cluster node names using fn_virtualservernodes – SQL Server

Get SQL Cluster node names using fn_virtualservernodes – SQL Server


fn_virtualservernodes() : This function returns the failover clustered instance nodes name that are configured in the SQL cluster instance. This function is a very useful function for users to identify the nodes in the cluster environment. But, we should have VIEW SERVER STATE permission to execute this function.

This function returns the failover clustered instance nodes list if we execute this function in SQL cluster instance else it returns no value.

Implementation

Executing fn_virtualservernodes() in normal SQL Server instance. So, We don;t get any result.

pic1This function may be removed from the future version of SQL server. So, we must use catalog view in new application development .

select * from sys.dm_os_cluster_nodes

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: