dbTalk Databases Forums  

programmatically determining active cluster node

microsoft.public.sqlserver.clustering microsoft.public.sqlserver.clustering


Discuss programmatically determining active cluster node in the microsoft.public.sqlserver.clustering forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ben
 
Posts: n/a

Default programmatically determining active cluster node - 03-01-2004 , 12:51 PM






Is there a way to determine the currently active node in a cluster? I would prefer to use .Net to determine which node is currently active. Anybody have any insight into this? I think I could do this with WMI on Windows Server 2003, but I need to get this information for Win2k

Thanks in advance
- Ben

Reply With Quote
  #2  
Old   
Sandeep Sutari [MSFT]
 
Posts: n/a

Default Re: programmatically determining active cluster node - 03-01-2004 , 03:27 PM






A WMI interface for Win2K clustering is not available, its introduced in
Win2003.

--
Sandeep Sutari
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"ben" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Is there a way to determine the currently active node in a cluster? I
would prefer to use .Net to determine which node is currently active.
Anybody have any insight into this? I think I could do this with WMI on
Windows Server 2003, but I need to get this information for Win2k.
Quote:
Thanks in advance.
- Ben



Reply With Quote
  #3  
Old   
Shon Shah [MSFT]
 
Posts: n/a

Default Re: programmatically determining active cluster node - 03-01-2004 , 03:37 PM



Ben,

The solution mentioned below does not use .Net but I thought it might help
you getting started. Hope this helps.

I assume by "active node" you meant the node that is hosting the group
containing your resource like Exchange or SQL.

Check out "Cluster Automation Server" documentaion at
http://msdn.microsoft.com/library/de...ion_server.asp.

Simple VBScript similar to the one below should give you the owner node. You
will have to replace "YourClusterName" and "YourGroupNameContaingResources"
appropriately.

Dim objCluster
Set objCluster = CreateObject("MSCluster.Cluster")
objCluster.Open("YourClusterName")
WScript.Echo
objCluster.ResourceGroups.Item("YourGroupNameConta ingResources").OwnerNode.N
ame
Set objCluster = Nothing

Alternatively, you can use cluster.exe as well to find out which node owns
the group

cluster.exe <YourClusterName> group <YourGroupNameContaingResources> /status

--
Regards,
Shon Shah
Software Test Engineer
Microsoft Cluster Server

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples, if any, are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm

"ben" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Is there a way to determine the currently active node in a cluster? I
would prefer to use .Net to determine which node is currently active.
Anybody have any insight into this? I think I could do this with WMI on
Windows Server 2003, but I need to get this information for Win2k.
Quote:
Thanks in advance.
- Ben



Reply With Quote
  #4  
Old   
magicgirl83
 
Posts: n/a

Default Re: programmatically determining active cluster node - 02-14-2005 , 11:40 PM




hi..i think we have the same project..

Set oCluster = CreateObject("MSCluster.Cluster")

i've done that but it gives me:

ActiveX Component can't create object MSCluster.Cluster....
why is this so?
anyone?
please help me..thanks..



ben wrote:
Quote:
*Is there a way to determine the currently active node in a cluster?
I would prefer to use .Net to determine which node is currently
active. Anybody have any insight into this? I think I could do this
with WMI on Windows Server 2003, but I need to get t
his information for Win2k.

Thanks in advance.
- Ben *


--
magicgirl83
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message439187.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.