Accessing the Windows Application Log

  • Is there a way to access the Windows Application log via a stored procedure? There are several events that I would like to capture. I haven't been able to find anything that will work. I would appreciate any input you could give.

    Thanks,

    John

  • I came across a sp named sp_eventlog. It is undocumented. It may be what I am looking for but I can't find what parameters I need to pass to it. Does anyone know if this sp will accomplish?

    Thanks,

    John

  • Hi,

    sp_eventlog in turn calls xp_eventlog...the only info I know about xp_eventlog is that it can be used to read event log information from within T-SQL...parameters to xp_eventlog are "Security","Application" or "System"...

    for example : xp_eventlog "Application"

    HTH...

    p.s :

    when I run sp_eventlog "System" I get no results...

    But when I run xp_eventlog "System" I get the following error :

    ODBC: Msg 0, Level 20, State 1

    Stored function 'xp_eventlog' in the library 'xpstar.dll' generated an access violation. SQL Server is terminating process 7.

    ??????

    Edited by - winash on 06/16/2003 11:49:41 AM

  • Thanks for the info. Whenever I try to run the xp_eventlog sp, I get the following error:

    Server: Msg 22005, Level 15, State 1, Line 0

    Error executing extended stored procedure: Invalid Parameter

    Maybe this sp isn't what I am looking for. I will keep experimenting.

    Thanks,

    John

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

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