Last active
November 29, 2016 17:34
-
-
Save ronascentes/2c522876b4accca6e96d4b9d1699e126 to your computer and use it in GitHub Desktop.
Look for usually errors by using xp_readerrrorlog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
xp_readerrrorlog - extended stored procedure accepts at least 7 parameters | |
Value of error log file you want to read: 0 = current, 1 = Archive #1, 2 = Archive #2, etc... | |
Log file type: 1 or NULL = error log, 2 = SQL Agent log | |
Search string 1: String one you want to search for | |
Search string 2: String two you want to search for to further refine the results | |
Search from start time | |
Search to end time | |
Sort order for results: N'asc' = ascending, N'desc' = descending | |
EXEC xp_readerrorlog 0, 1, NULL, NULL, NULL, NULL, N'desc' | |
*/ | |
EXEC xp_readerrorlog 0, 1, NULL, NULL, NULL, NULL, N'desc' | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment