April 14, 2017 at 7:21 am
Morning Guys,
Is there a way to get the Windows Cluster Name from within SQL Server? Much like what is shown on the AlwaysOn Dashboard.
Cheers
Alex
April 14, 2017 at 10:40 am
alex.sqldba - Friday, April 14, 2017 7:21 AMMorning Guys,Is there a way to get the Windows Cluster Name from within SQL Server? Much like what is shown on the AlwaysOn Dashboard.
Cheers
Alex
Try this:SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [CurrentNodeName]
Steve (aka sgmunson)
Rent Servers for Income (picks and shovels strategy)
April 14, 2017 at 11:57 am
Hi Steve,
That doesn't give me the name of the cluster. That gives me the node name that owns the clustered sql resource (in terms of WFC).
I want to know the name of the cluster.
For example, on the top left of the AlwaysOn Dashboard it gives you the cluster name. This is a 'virtual name' I guess for the cluster.
Cheers
Alex
April 14, 2017 at 12:27 pm
aha! found it here: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-hadr-cluster-transact-sql
whilst searching for something unrelated!
April 14, 2017 at 2:08 pm
alex.sqldba - Friday, April 14, 2017 12:27 PMaha! found it here: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-hadr-cluster-transact-sqlwhilst searching for something unrelated!
Glad you found it.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy