Monitoring SQL Server Logs

  • Greetings, I was wondering what tools you all would suggest outside of Enterprise Manager for monitoring the SQL Server logs. I would like something that could filter out entries and allow you possibly be notified when certain things occur, such as Logon failures...it would be great if it would even do things as get spid info. Any thoughts out there?

  • Some of those things are also written to the Windows event logs, or can be configured to do so. If you have a tool to monitor those, it works well.

  • Microsoft's LogParser is quite a powerful commandline tool. It allows you to use SQL-like syntax to match strings and pipe output to various formats and even to a SQL database directly.

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

    I use it on Errorlog and SQLAgent.out.

  • can it be something like:

    if exists (select * from TEMPDB.dbo.sysobjects where id = object_id(N'[TEMPDB].[dbo].[#tempseverityerrorlog]'))

    drop table [#tempseverityerrorlog]

    create table #tempseverityerrorlog (lineid int identity(1,1),line varchar(500),ContinuationRow int)

    insert #tempseverityerrorlog exec master.dbo.xp_readerrorlog

    select * from #tempseverityerrorlog where line like '%Severity: 24%'

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

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