SQL Server Performance

Read error logs

Discussion in 'General DBA Questions' started by cb, Jan 30, 2003.

  1. cb New Member

    I am aware about accessing SQL server error logs from enterprise manager and from command prompt.

    Is there any way I can read the same using stored procedures from query analyzer. I need to compile a report for the server setup I have on the network.

    Any help would be greatly appreciated.

    Thanks for the time and sharing knowledge.
  2. satya Moderator

    Its possible but its undocumented, those are SP_ENUMERRORLOGS and SP_READERRORLOG, where both works from 7 version onwards. Make sure these 2 SPs can be executed by using SYSADMIN privileges only.

    For report utility you can use SQLDIAG which gathers and stores diagnostic information and the contents of the query history trace.

    Refer to books online for SQLDiag utility.

    Satya SKJ

Share This Page