Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending the error code via email from a failed DTS. Posible?

Status
Not open for further replies.

ewilkes

IS-IT--Management
Feb 10, 2003
8
US
I would like to capture errors from an Execute SQL Task (a Stored Procedure). I have a step caled sendmail_failure which is:
Declare @Msg VarChar(32)
Declare @Sub VarChar(32)

Set @Sub = 'DTS Package Failure' + ' ' + Cast(GetDate()as VarChar)
execute master.. xp_sendmail @Recipients = 'myemail@address',
@subject = @Sub,
@message = 'Sproc_DataMerge: Update Failure'

What I'm hoping to do is send any error information in the message body portion of the mail. Since the job runs at 3am I want to do as little searching for the problem as possible. Can this be done? Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top