Change SQL Notification subject

  • Hi All,

    SQL Server Job System: 'TESTJOB' completed on \\Server_Name

    I wanted to see if I can modify this to send e-mails with this subject line.

    SQL Server Job System: 'TESTJOB' completed on <Server_Name>

    Is this possible? If so can someone help me with?

    Thanks in Advance.

  • Use sp_send_dbmail to construct desired subject lines and use that a part of job to send alerts.

  • The mail generated by the Job Notification system is predefined and AFAIK it can't be changed. The only way to accomplish your request is to create your own messaging system with sp_send_dbmail as Neeraj Dwivedi already suggested.

    You could add this as a job step to your existing job or you could create a new job that periodically queries the job-history table and use sp_send_dbmail to sent the results. Keep in mind that this last option creates latency between the end of a job and the sending of the mail.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply