Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Script to Search SQL Error Log For a String

By Edward Pochinski,

This script(sproc)uses xp_cmdshell from sql and FINDSTR from DOS to search the current errorlog for a specific string such as kernel or failed login. Compile this in the master db and if you do not pass an input parameter a example usage will display for you. ex:
sp_dba_sqlerrorlog kernel    

Edward J Pochinski III

Total article views: 1799 | Views in the last 30 days: 7
 
Tags
miscellaneous    
 
Contribute