Querying the Event Log Via SQL Server

  • Dear All

    I have noticed that you can use Policy based management to to query the event logs on a SQL Server. Does anyone know if it is possible to directly query the event logs using SSMS?

    Thanks in advance

  • Take a look at xp_readerrorlog and see if that will do what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • thanks for that, does this just check the sql server error log? I need to look specifically at the Windows Event logs (Application and System)

  • xp_readerrorlog only queries the SQL server log(s), not the windows event log

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply