Analyzing SQL Error Logs and Agent Logs

  • We are looking for ways to analyze our SQL Error logs and Agent logs more efficiently, without having to physically look through them everyday.

    Does anyone have any reccomendations on any software that will do this for us? Or maybe someone has a good method of using SSMS to do it?

    Thanks in advance.

  • I use SSMS 2008 and run against a server group. I execute master.dbo.xp_readerrorlog against the server group and pipe the results into a table and then I filter out the "noise" I don't want to see. Plenty of options for what gets returned. you can read both the SQL Server logs and the Agent logs from that procedure.

  • xp_readerrorlog is the main way that gets done. It's an undocumented, unsupported method, but it's what's most common.

    I've put in a request to Microsoft to document it or support it, or provide another option that they do support. That's here.

    - 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

  • Have you looked at Operations Manager? That will monitor your logs and send out alerts.

  • The article SQL Overview IV - DBA's Morning Review[/url] includes a variety of reports that can be scheduledeach morning. One report 'Error Log Messages Report" specifically addresses reporting only errors found in the error log. Unfortunately these reports are dependent to a SSID package that is used to collect information from multiple instances.

    David Bird

  • Try Log Parser:

    http://www.microsoft.com/DownLoads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

    It lets you run SQL-like queries against all sorts of files.

  • For the SQL Error logs I use an SSIS package that uses a forloop each container to connect to all my production boxes and use xp_readerrorlog to gather the logs.

    I do the same thing for the windows event logs, ssis that is, but use DumpEvt to collect the logs, I tried and used logparser for some time, but even though it has rudimentary query support, querying on date to limit the return takes as long as selecting the whole log, with DumpEvt you can place a switch that returns only the newly created log entries since the last run, a lot faster, we collect every hour.

    Here is a good article on how it can be set up:

    http://www.sql-server-performance.com/articles/per/event_logs_dumpevt_p1.aspx

    Andrew

Viewing 7 posts - 1 through 6 (of 6 total)

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