View Eventlog entries from SQL Analyzer

  • Hi,

    Sometime back I have come across an extended stored proc. that can be used to read eventlog. Somehow I lost track of that.

    Can anyone point me to this.

    Thanks & Regards,

    Mitra

  • It is xp_eventlog.

    To view the application log do xp_eventlog 'Application'.

    These works in 7 but not 2000. xp_eventlog is there but have not found the parameters yet.

    Edited by - antares686 on 09/26/2002 05:23:53 AM

  • Hi,

    In 2000 xp_eventlog is used to write to application log.

    In 2000 xp_eventlog has following parameters:

    ERROR#,Message,Severity

    where ERROR# must be user defined, Message = any str, severity: WARNING, INFORMATIONAL or ERROR

    I've been using it, must somehow it is not always possible to write to the application log although nothing has changed concerning the owner of the job I use to run it (or the login used). Why I don't know.

    With Kind Regards/Met vriendelijke groet

    Schil

    'It's never ending and never surrendering' Unida 1999


    With Kind Regards/Met vriendelijke groet
    Schil
    'It's never ending and never surrendering' Unida 1999

  • I've contributed a script to SQLServerCentral that allows you to import event log entries from network computers using LogParser (from Microsoft's IIS Resource Kit).  Just do a search for LogParser and you'll see it in the Scripts section.

    Mark

  • Think you look for this query to SQL Server log:

    EXEC sp_readerrorlog 1, 'C:\MSSQL\LOGS\SQLlog.txt', 1, 'error'

    where 'C:\MSSQL\LOGS\SQLlog.txt' - is location of your SQL serever error log, 'error' - is search string for you allert.

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

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