The xp_ReadErrorLog extended stored procedure allows you to display the logs for SQL Server 2005 amnd also (as it turns out) the logs for SQl Server Agent.
Usage:
xp_ReadErrorLog - shows the default log for SQL Server.
xp_ReadErrorLog 0,2 - shows the error log for SQL Server Agent (the second parameter means "Agent")
Parameters:
1 (int): Log Number
2 (int): 1 = SQL Server, 2 = SQL Server Agent
3 (string): Search string for searching for a log entry.
4 (string): Another search string.
Source: SQLTeam.com
No comments:
Post a Comment