locked
In SQL Server Agent Job Email Notification RRS feed

  • Question

  • Hi All...

    I have created a DTS using SQL 2000 and schedule it in the SQL Agent. The SQL Server Agent is providing the mailing options for Either Job Failed, Job Succeed or Job Completes.

    I need a Different Emails for Successful Job run as well as Email when the Job Got failed... 

    But onething is i can put the same stuff in the Last Step of the DTS.... But i need to set the same in the JOB level not in the DTS Tasks.

    Is there any way to set this ???.... Could any one able to help me on this ???

    I know this forum is related to 2008 but i don;t have time to search the 2008 DTS section. If Anyone knowz the location please move this question there as well....

    Thanks in Advance.

    Best Regards,

    Gopi. V
    • Moved by Phil Brammer Monday, October 12, 2009 2:12 PM Moving to Tools General - this isn't an SSIS question. It is more of an Agent question. (From:SQL Server Integration Services)
    Monday, October 12, 2009 12:17 PM

Answers

  • You would have to configure either "SQL Mail" (not fun because it uses MAPI) and use xp_sendmail or dearch for xp_smtp_sendmail and use that instead. I.e., add two finishing jobsteps (one for success and other other for fail) and drive the flow logic accordingly.
    Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi
    • Proposed as answer by LekssEditor Monday, October 12, 2009 5:08 PM
    • Marked as answer by Alex Feng (SQL) Monday, October 19, 2009 2:51 AM
    Monday, October 12, 2009 4:28 PM

All replies

  • You can use Notifications while creating the jobs.
    It will send mail with Success or Failure message.
    I am not sure if you can customize the message.
    Nitesh Rai- Please mark the post as answered if it answers your question
    Monday, October 12, 2009 12:46 PM
  • You would have to configure either "SQL Mail" (not fun because it uses MAPI) and use xp_sendmail or dearch for xp_smtp_sendmail and use that instead. I.e., add two finishing jobsteps (one for success and other other for fail) and drive the flow logic accordingly.
    Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi
    • Proposed as answer by LekssEditor Monday, October 12, 2009 5:08 PM
    • Marked as answer by Alex Feng (SQL) Monday, October 19, 2009 2:51 AM
    Monday, October 12, 2009 4:28 PM