I'm looking for a script (Powershell?) which will scan a directory of the batch job log files produced by running DBCC CHECKDB as a batch SQL Server Agent job against a series of databases on a server. Each run produces text log file that, hopefully, includes near the bottom the line:
[font="Courier New"]CHECKDB found 0 allocation errors and 0 consistency errors in database 'test'. [SQLSTATE 01000][/font]
The script should scan (grep) all of the log files and, ideally, email a message when either error count is not zero.
Has anyone seen a script like this?
Thank you for any help.
Alan