Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Change SQL Notification subject Expand / Collapse
Author
Message
Posted Wednesday, May 8, 2013 2:59 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 9:10 AM
Points: 86, Visits: 367
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.
Post #1450809
Posted Thursday, May 9, 2013 10:11 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, July 29, 2014 1:21 PM
Points: 809, Visits: 1,160
Use sp_send_dbmail to construct desired subject lines and use that a part of job to send alerts.
Post #1451245
Posted Tuesday, May 14, 2013 6:26 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 8:12 AM
Points: 2,247, Visits: 2,708
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’! **
Post #1452531
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse