Merhaba,
SCOM ‘un SQL Database tarafı ile ilgileniyorsanız aşağıdaki kodlara ihtiyacınız olacaktır. Örnek Bir Agent ‘ın Healty State bilgisi 1 ise Success 2 ise Warning dir..
Komutlar çalışmazsa kopyalayıp yapıştırdığınız içindir. Düzeltip tekrar denerseniz çalışacaktır..
Detaylar aşağıdaki gibidir;
0 = Microsoft.EnterpriseManagement.Configuration.HealthState.Uninitialized
1 = Microsoft.EnterpriseManagement.Configuration.HealthState.Success
2 = Microsoft.EnterpriseManagement.Configuration.HealthState.Warning
3 = Microsoft.EnterpriseManagement.Configuration.HealthState.Error
DB üzerinden tüm clientların bilgilerini almak için aşağıdaki sql sorgusunu kullanabilirsiniz;
SELECT
*
FROM
ManagedEntityGenericView
INNER
JOIN
ManagedTypeView
ON
ManagedEntityGenericView.MonitoringClassId = ManagedTypeView.Id
WHERE (ManagedTypeView.Name =
‘microsoft.systemCenter.agent’)
Komutu biraz daha geliştirelim; aşağıdaki sorguyu kullanırsanız Windows ‘un State’ini alırsınız. Yukarıdaki sorgu ile SCOM Agent durumunu alıyorduk..
SELECT
*
FROM
ManagedEntityGenericView
INNER
JOIN
ManagedTypeView
ON
ManagedEntityGenericView.MonitoringClassId = ManagedTypeView.Id
WHERE (ManagedTypeView.Name =
‘Microsoft.Windows.Computer’)
and
languagecode
= ‘ENU’

Senior IT Pro Trainer & Consultant focused on MS technologies relating to System Center Products SCCM, SCOM, SCO, SCSM