I wanted to standardize job error notifications, so created an new operator called ‘DBA’ (with multiple email addresses).
This code semi-automates the process of updating all the jobs by listing them along with the code needed to change them …
-- ChangeNotifications.sql Select J.name JobName, O.name OperatorName, O.email_address, 'EXEC msdb.dbo.sp_update_job @job_name = N''' + J.[name] + ''', @notify_email_operator_name = ''DBA''' CommandToChangeIt from msdb..sysjobs J join msdb..sysoperators O on O.id = J.notify_email_operator_id order by OperatorName desc;