Last active
September 2, 2018 20:32
-
-
Save LetsGoRafting/7ccad737d97b476e9d6f106f94227249 to your computer and use it in GitHub Desktop.
This file contains 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
-- Parameters: | |
-- int - log file number 0 is current, any other the nth file descending | |
-- int - 1 for SQL Server logs, 2 for Agent logs | |
-- string - search word 1 | |
-- string - search word 2 | |
-- date - from | |
-- date - to | |
-- desc - for descending, otherwise ascending as default | |
-- search server log for key word 'error' | |
xp_readerrorlog 0,1, 'Error', NULL, NULL, NULL,N'desc' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment