locked
Windows event log in SQL Server 2000 RRS feed

  • Question

  •  

    How to verify whether windows event log is enable in MSSQL 2000 or not through SQL Client (or sql query)
    Wednesday, March 26, 2008 11:05 AM

Answers

  • xp_logevent is used to log a message in the windows event log.

     

    Try to log a message using this and get the return value to conclude whether its success/failure.

     

    Refer MSDN for the syntax of the same. I Remember there are around 3 parameters you have to pass. Had used this long time back so not sure.

    Friday, March 28, 2008 1:16 PM

All replies

  • Are we talking about the audit level of the server?

     

     

    Wednesday, March 26, 2008 1:51 PM
  • Thanks for reply , I wanted to know in SQL 2000 how to check through sql query whether windows event log is enable or not , I think SQL write windows event log for auditing purpose. Please rever if you know in which table we can verify whether sql is writing windos event log or not

    Friday, March 28, 2008 6:05 AM
  • can't you run the eventvwr.exe using the XP_CMDSHELL ?

     

    Friday, March 28, 2008 8:20 AM
  • Thanks  Manikandan

    I have to write a utility in java , which checks whether windos event log of SQL 2000 is enable or not , for that I need a sql query by which I can verify, so is there any table in SQL database where we can check this

    Friday, March 28, 2008 10:04 AM
  •  Jaydeeptiwari wrote:

    Thanks  Manikandan

    I have to write a utility in java , which checks whether windos event log of SQL 2000 is enable or not , for that I need a sql query by which I can verify, so is there any table in SQL database where we can check this

     

    This is not the ideal forum for your question. This forum is dedicated to SQL Server Integration Services. Your question is related to the core database engine. You will probably have much better luck if you post your question on a forum related to the engine and not SSIS.

     

    Friday, March 28, 2008 11:53 AM
  • Got that now. USe the extended procedure XP_LOGEVENT. It returns 0 when success and 1 when failure.

    Friday, March 28, 2008 12:19 PM
  • I'm running the procedure like "EXEC master..xp_logevent" It is giving so many values in ERROR_LOG , COUNTINUTIONROW column , still bit confuse. Can you please explain bit more.

    Thanks a lot.

     

    Friday, March 28, 2008 12:56 PM
  • xp_logevent is used to log a message in the windows event log.

     

    Try to log a message using this and get the return value to conclude whether its success/failure.

     

    Refer MSDN for the syntax of the same. I Remember there are around 3 parameters you have to pass. Had used this long time back so not sure.

    Friday, March 28, 2008 1:16 PM