Home Forums SQL Server 2008 T-SQL (SS2K8) Is it possible to use sp_update_job to remove job notification? RE: Is it possible to use sp_update_job to remove job notification?

  • I think if you simply change the email_level to 0 then you will only be undoing part of what your initial script is doing. The sp_update_job stored proc only changes the values of parameters that are supplied, leaving the others unchanged. I am guessing your original code maybe does not work because you would not typically want an email operator assigned if the email_level indicates that an email should not be sent. Try the below to remove email notification and the operator.

    EXEC msdb.dbo.sp_update_job

    @job_name=N'MyJobName',

    @notify_level_email=0,

    @notify_email_operator_name=N''

    GO