how can you determine which one is active?
how can you determine which one is passive?
how can you determine what the other node(s) are in the cluster ?
can you determine the state of one node from another node ?
the first test is simple, they just check if the WINDOWS SQL service is running on that node.
then check the sesond node to see if the windows sql service is there but not running.
so if one is running, it is godd compliance wise.
The component templates aren’t going to span multiple boxes so you could write a check that checks all nodes and looks for the running service and if it’s in an active state, or the service not running and in a passive state and fail if one of those is not true.
Can you do this from a command line or PowerShell or any other means similar to this? And output the result in a Name/Value format like:
The results can be in any form however; true/false, 0/1, on/off, etc.
If so, we can create an Extended Object in BSA and use that in your compliance check.
I think we can achieve this by some scripting and creating an Extended object.
create a NSH script and parametrize the cluster detail( IP or hostname) or even you can hard code the details of cluster in the script itself, if you are not planning to reuse the same script for some other scenario.
then fetch the details of service running or whatever for the cluster in question and echo the result. Based on the details fetched from the servers you will have something like below in the EO. We can use name=value grammar file here.
now in compliance rule have something like
(host1_service =ACTIVE AND
(host1_service =INACTIVE AND
I hope my understanding is correct.
Can you post the entire actual output? It will make it easier looking at how many returns you're getting to come up with a proper compliance rule. I'm worried about handling the service names. You might end up having to write a script that does these checks and comes back with a true/false return.
Taking a slightly different view, but still using Extended Objects you could do something like.
I'll preface this by saying I've never used TSQL or cluster.exe before.
Create a script that uses TSQL or cluster.exe to produce a list of all nodes and there status's.
cluster.exe hints:SQL Server Clustering Management inside the command line
This way you can see any other related nodes and you could build a rule that ensures at least one is active/up.