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

/*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

What do you think about this post?
Leave a Comment
  • Post
What others have said about this post...
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

Page 1 of 1 (2 items)