Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Retreive Previous Task Name

Author  Topic 

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2010-12-09 : 13:46:23
I have a mail task that kicks off an error email.

How can I included in the email a failing task name?
Basically, if a task fails, I want to send an email including the failing task name within the body of the email.

I know you can use @[System::TaskName], but that is giving me the mail task name, not the problem task.

Thanks

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-12-09 : 14:24:20
You have to iterate through the task collection and check the result.
It's been a long time since I've done that and I can't even remember whether I actually did it for ssis. It was a common thing to do for dts though.

Can you not use the logging feature to log to a table (or file) then read that?
Another possibility might be an error handler.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -