system extended stored procedure xp_readerrrorlog use to read errorlog
- Parameter 1 Type :- INT
Name :- Error Log File
Default Value :- 0
Description :- 0 for current, 1 for Archive #1, 2 for Archive #2, and so on - Parameter 2 Type :- INT
Name :- Log File Type
Default Value :- 1
Description :- 1 for error log and 2 for SQL Server Agent log - Parameter 3 Type :- Varchar (255)
Name :- Search String 1
Description :- String one wants to search in error log - Parameter 2 Type :- varchar (255)
Name :- Search String 2
Description :- Its second string which can be searched to refine the search result
exec xp_readerrorlog 0,1,null,null