• This is a useful solution and I've just used it as a framework to replace the method I have been using to scan/alert errorlogs for the past 5 years.  

    I had some problems with the double quotes and couldn't understand why.  I ended up rewriting the sproc using only single quotes.

    One question/suggestion concerns keeping a history of errorlog messages that have been reported as exceptions through this mechanism.  Currently it appears that the table ErrorsP1 gets emptied out every time the procedure is run.  Every morning, I like to see a log of the previous 24 hours alertable errorlog messages.  Granted, I could trawl through my emails but this isn't ideal.   In any case, it's probably a good idea to keep an archive of the errorlog messages that have been reported as exceptions so that they can be analysed.   One idea for this would be to create an errorlog archive table and write any rows that get written to this table as well as to errorsP1.

    Thanks