I want an automatic email when a task of a DTS package fails...Plz Help

  • I have a DTS package, there are many tasks in it. Some of these tasks fail sometimes. I need to monitor the tasks while they are running. This takes a lot of time.

    Can I not receive an e-mail containing error message and failure time as and when a task fails, automatically?

    Please help me and tell how this can be achieved.

    Regards,

    Naresh

  • Use the On Failure to send an email.  I believe it is the send mail task.  Check out this link for suggested use http://www.sqldts.com/235.aspx.

    If you set it up you only need one send mail task fed from each of the failure points and you can dynamically change the subject and body text depending upon which step fails.

    Regards,
    Matt

  • Thanks for your help, Matt.

    Now I am receiving e-mails on failure of any package but only with static contents.

    I am a DTS beginner and would like to hear more about dynamically changing the mail so that Users can know which task is failing and the error message.

    Regards,

    Naresh

  • What I've done in the past is set up several global variable(s).

    Create an Active-X task that updates the variable(s) between each failure and the sendmail task. 

    For me the Active-X task was as simple as:

    Dim MSG

    MSG = "Step 1 of the Nightly Import Process Failed."

    DTSGlobalVariables("glvMessage").value = MSG

    Increment the Step for each failure, or use a more appropriate message.

    Hope that helps.

     

    Regards,
    Matt

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

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