You check your SQL and Agent Error Logs every day, right?
Here is a powershell script to make that process easy.
Ideally you will have a list of servers stored somewhere in a database so that as servers are added/removed your script continues to work as expected.
- Make sure you have Powershell v3 installed, I haven't tested this script on v2
- You will need to install module invokesqlquery, get it from http://powershell4sql.codeplex.com/
- Modify the query at line 26 to dynamically supply the names of your servers (recommended)
- Modify line 31 to supply the list of your servers manually (useful for testing)
- Run the script in the Powershell ISE environment or equivalent.
- All SQL errors from all servers are displayed in their own window that you can filter and search
- All SQL AGENT errors from all servers are displayed in their own window that you can filter and search
- Modify the date filter at line 21 to go back further than 1 day
- Modify the text filters at lines 40 and 41 to include/exclude other text
- Modify the first parameter of the call to EXEC master..xp_readerrorlog to look at older logs than the current - 0 = current log, 1,2,3 etc are any older logs
- That's it! Have fun and start enjoying checking your error logs instead of it being a chore....