Today I learned to always cycle the error log before enabling alerts after receiving 15,000 text and email messages. When you enable alerts SQL will read through the current error log and alert you to all the problems you have had. Since we already fixed those issues we are only concerned about future problems. To give yourself a clean log run:
EXEC sp_Cycle_ErrorLog
If you forgot to do clear the log and the other DBAs you work with are throwing things at you:
Stop SQL Agent
--number of unsent emails
select count(*) from msdb.dbo.sysmail_unsentitems --remove all the unsent emails
delete from msdb.dbo.sysmail_unsentitems
Remember to turn SQL Agent back on when done.
No comments:
Post a Comment