Using xp_ReadErrorLog in SQL Server 2005

http://www.sqlteam.com/article/using-xp_readerrorlog-in-sql-server-2005

* Parameter 1 (int), is the number of the log file you want to read, default is “0″ for current log. The extended stored procedure xp_enumerrorlogs will come in handy in determining what SQL server error logs or SQL server Agent logs exist and when they were created. NOTE: extended stored procedure xp_enumerrorlogs parameter (1) works just like xp_ReadErrorLog parameter (2). A value of 1 shows available SQL error logs and a value of 2 shows Agent logs. The default value is 0.
* Parameter 2 (int), value of 1 reads SQL error logs, value of 2 reads SQL Server Agent logs, with a default value of 1.
* Parameter 3 varchar (255), is a search string for the log entry, with a default value of NULL.
* Parameter 4 varchar (255), is another search string for the log entry, with a default value of NULL.

Update me when site is updated

Leave a Reply

You must be logged in to post a comment.