When connecting to either a clustered SQL instance or an instance participating an always on availability group, I would like to get the connection details of the nodes. For always on i looked at sys.dm_hadr_availability_replica_cluster_states and where member_type = 0. I could not get the SQL port number, however. Secondly, is there a DMV I can look at for a standard SQL cluster (active/passive or active/active) ?
Please note that I want to get this information from within a SQL instance only and not from the OS.