Command Shell Examples
Useful SQL Queries
Number of events collected per day for last 28 days - Jonathan Almquist on Operations Manager - Site Home - TechNet Blogs

Number of events collected per day for last 28 days

Number of events collected per day for last 28 days

  • Comments 2
  • Likes

/*Number of events collected per day for last 28 days.*/
USE OperationsManagerDW
SELECT CONVERT(VARCHAR(10), DateTime, 101) AS Date, COUNT(*) AS Events
FROM  Event.vEvent
WHERE (DateTime BETWEEN DATEADD(day, - 27, GETDATE()) AND GETDATE())
GROUP BY CONVERT(VARCHAR(10), DateTime, 101)
ORDER BY Date DESC

Back to SQL queries main menu

I do not moderate this blog anymore. If you have a question regarding this post, send me a message.

Comments
  • It sure would be nice to be able to pull this is a report from SCOM or have an excel spreadsheet that would link to the SQL DB and pull the data.

  • Hi Mike,

    Since all these queries use OperationsManagerDW, these could be plugged into a report using that existing data source with a fair amount of ease.

    -Jonathan