SCOM 2016 - SQL queries

Hi Team,

Is there any sql query available to get availabilty data for all the windows/Linux servers.


Something for reference:

Thank you for replying,

I tried with below query but the query is not returning the output. its showing as query row limit exceeded

SELECT DisplayName,


FROM Perf.vPerfRaw

JOIN vManagedEntity ON vPerfRaw.ManagedEntityRowId = vManagedEntity.ManagedEntityRowId

WHERE PerformanceRuleInstanceRowId IN

(SELECT PerformanceRuleInstanceRowId FROM vPerformanceRuleInstance

WHERE RuleRowId IN (SELECT RuleRowId FROM vPerformanceRule WHERE CounterName LIKE ‘System Up Time’))

AND DisplayName LIKE ‘%XXXX%’

AND FullName LIKE ‘%HealthService%’

ORDER BY DisplayName,[DateTime] DESC

Did you replace the names of the server/counter etc?