Posts Tagged ‘Query’

SQL Query to get the state of a distributed application

07/02/2010 Leave a comment


I helped a customer creating a SQL query to check the state of a distributed application. the customer needed that to publish the state of some distributed application using his share point IT portal.

/* My Disributed Application */

/* SELECT bme.FullName, bme.DisplayName, s.HealthState */

SELECT s.HealthState

FROM state AS s, BaseManagedEntity AS bme

WHERE s.basemanagedentityid = bme.basemanagedentityid

AND s.monitorid IN (SELECT MonitorId FROM Monitor WHERE MonitorName = ‘System.Health.EntityState’)

AND  bme.DisplayName = ‘My distributed Application’


Categories: OpsMgr Tags: ,