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 2008 Forums
 SSIS and Import/Export (2008)
 how to skip a step if error after recording error

Author  Topic 

sarahmfr
Posting Yak Master

214 Posts

Posted - 2011-09-05 : 12:34:14
I have a loop that goes thru files
and it performs script task, xml xslt task, data flow task,sql task delete file, then move file
I am recording errors in the data flow task to an error flat file,
I want if there is an error in data flow after recording the record that causes the error to go directly to the move file task.
When I drag the red error coming out of the data flow task directly to the move file task it does not go there even if there is an error . Shall I select ignor failure in the dataflow and not record the to the error flat file.
Or what shall I do.
Thanks

sarah

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-05 : 13:04:59
if data flow task fails what you can do is add an OnError event for data flow task and then inside it add move file task. every time data flow errors, event gets triggered and move file will be executed to move the file.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sarahmfr
Posting Yak Master

214 Posts

Posted - 2011-09-05 : 13:30:01
Thanks so so much
Can I get rid of the part for writing errors to the error flat file I really do not need it since if i skipped the intermediate steps i will know that an error occurrd
In this case if I said ignore failure in the data flow so as not to write to error flat file
does this means the on error event handler will not take place ???
i.e if in data flow task I said ignore failure will the on error event handler will still take place *which I need to take place"

sarah
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-05 : 14:03:45
if you made it ignore failure, event handler wont fire as data flow component is not failing.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sarahmfr
Posting Yak Master

214 Posts

Posted - 2011-09-05 : 20:15:31
Thanks

sarah
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-06 : 04:25:12
wc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -