all groups > sql server dts > june 2007 >
You're in the

sql server dts

group:

How? Programmatically determining the package is failing


How? Programmatically determining the package is failing Lee Gillie
6/18/2007 1:11:17 PM
sql server dts:
If I get some script code to run at the end of a package execute, is
there any way to tell the package is successful or failing at this point
in script? I want to set a subject line for a mail task to SUCCESS or
Re: How? Programmatically determining the package is failing Lee Gillie
6/18/2007 2:35:17 PM
[quoted text, click to view]

Add one to every single task?

Seems like there should be something in the DTS (SSIS) object model to
tell you in a script, the package is failing. I take it you are saying
it does not exist?

If so then it may be far less tedious to code a single on-error event
handler for the package, and set my own flag, if there is no existing
one? Lacking a built-in flag, I can see what you are saying to do.

Re: How? Programmatically determining the package is failing Paul Ibison
6/18/2007 10:18:50 PM
Why not just use an 'On Failure' precedence constraint?
Paul Ibison

Re: How? Programmatically determining the package is failing Paul Ibison
6/20/2007 2:14:00 AM
I suppose in SQL Server 2005 you could also do it tangentally. You could log
to a sql server table and have a process which polls the table for the
failure message and then sends the email. The packages I've seen though use
failure precedence constraints for each step. Basically, there is a child
package that sends an email. There is also an execute package task that runs
on failure of each individual step via precedence constraints which sends
global variable details to call the email package.

Note that in SSIS the event handling is pretty straightforward for this type
of scenario.

Cheers,
AddThis Social Bookmark Button