I have also tried
"Windows Service:*"."Internal Name (Windows)" contains "MSSQLSERVER"
but that too does not work.
What version of BSA are you running, it is not working for me
We are using 8.2.03 and the rule definition does not work, I am now looking at using an extended object
Hey my bad. I just missed the line you are trying to create discover rule. I have also observed for discovery rule it is not working but the same works fine if we create a compliance rule.
I am not sure but we maybe limited to use only properties not server objects to discover something.
I doubt even EO approach may not work.
As a workaround I am now using an extended object...
tasklist /FI "IMAGENAME eq sqlservr.exe"
The only issue is that SQL Server MUST be running
are you trying to create a discover rule or compliance rule ?
Discover rule, so I can then use it in my smart groups.
I think this might be my best option
nexec -e sc query | findstr /R DISPLAY_NAME | findstr "SQL"
Then look for SQL Server, just working out the best way to implement this
Please, checkout if this helps :-
"Registry Value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\InstalledInstances"."String Value (Windows)" contains "MSSQLSERVER"
use below command in your EO
sc query SERVICENAME | find "STATE"
sc query MSSQLSERVER | find "STATE"
Doesn't work if the instance names have been renamed, for example...
String Value HRMWSPD248SQL06 HRMWSPD248SQL01 HRMWSPD248SQL02 HRMWSPD248SQL03 HRMWSPD248SQL04 HRMWSPD248SQL09 HRMWSPD248SQL07 HRMWSPD248SQL17 HRMWSPD248SQL15 HRMWSPD248SQL16 HRMWSPD248SQL08 HRMWSPD248SQL19 HRMWSPD248SQL21 HRMWSPD248SQL22 HRMWSPD248SQL14
We have no control over what the instances are called
That does not work either
HRMWSPD242% nexec -e sc query MSSQLSERVER | find "STATE"
find: STATE: No such file or directory
The only reliable way is to list the name of installed services and only discover them if there is a service containing the phrase "SQL Server"