July 18, 2006 at 10:36 pm
Hi,
I have 2 nodes, node1 and node2 on Cluster Mycluster.
How can I find on which node the cluster is active. I can find from Cluster Admin, but I want to find it from SQL Server. Is there some sp or fn available, which when queried gives the active node name.
Thanks,
Kishore
July 19, 2006 at 2:16 am
I think you'd have to read from the registry, I'm not aware of any sql functions which return the underlying node name for a cluster.
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
July 19, 2006 at 2:26 am
This simplest way I can think of doing it is something like this:
EXEC xp_cmdshell 'cluster resource "SQL Server (Instance_Name)"'
John
July 19, 2006 at 3:30 am
Thanks Guys.
July 20, 2006 at 1:43 pm
July 21, 2006 at 5:11 am
select
serverproperty('ComputerNamePhysicalNetBIOS')
will give you the name of the current node, for a non clustered server it returns the machine name. This is for SQL 2005 ONLY.
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply