Users: 15,000+ | Page Views: 50,000+ | PPS: 2.5
TechDevOps.com
Explore Tools
{Experts in Microsoft SQL Server Operations, Performance, HA/DR, Data Migrations & Cloud Computing}



Get Number of Microsoft Systems Center (SCOM) Events Per ComputerName
by BF (Senior MSSQL Operations - Enterprise, Cloud, Strategy)
2017-08-30









T-SQL:


SELECT
TOP 50 UPPER(LoggingComputer) as 'Computer Name',
COUNT(*) AS 'Total Events'
FROM EventallView with (NOLOCK)
WHERE TimeGenerated > dateadd(dd,-7,getutcdate()) -- Scoped to within last 7 days
GROUP BY LoggingComputer
ORDER BY 'Total Events' DESC



Resources:

OpsMgr 2012 – Grooming deep dive in the OperationsManager database