dbTalk Databases Forums  

Sending Step that failed

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Sending Step that failed in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scubafrog67
 
Posts: n/a

Default Sending Step that failed - 10-06-2003 , 09:35 PM






I'm using email to notify if a package is successful or
failed. How can I add into the email what step of the DTS
package failed so I have an idea where to start looking?

Thanks in advance

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Sending Step that failed - 10-07-2003 , 12:26 AM






You could parse the error log or you could programmatically loop through the
steps looking for the failure

Taken from

Execute a package from Visual Basic (VB)
(http://www.sqldts.com/default.aspx?208,1)

<SNIP>
For Each oStep In oPKG.Steps
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
oStep.GetExecutionErrorInfo lErr, sSource, sDesc
sMessage = sMessage & "Step """ & oStep.Name & _
""" Failed" & vbCrLf & _
vbTab & "Error: " & lErr & vbCrLf & _
vbTab & "Source: " & sSource & vbCrLf & _
vbTab & "Description: " & sDesc & vbCrLf & vbCrLf
Else
sMessage = sMessage & "Step """ & oStep.Name & _
""" Succeeded" & vbCrLf & vbCrLf
End If
Next
</SNIP>

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Scubafrog67" <scuba79 (AT) spammeanddie (DOT) bellsouth.net> wrote

Quote:
I'm using email to notify if a package is successful or
failed. How can I add into the email what step of the DTS
package failed so I have an idea where to start looking?

Thanks in advance



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.