Read error logs | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Read error logs

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.
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