Excel file import error handling - move files to folder on task failure
I have an SSIS package with a ForEach loop containing a Data Flow task that imports an Excel file into a SQL database. From there, I have a File System Task that takes the Excel file and moves it into an Archive folder. I followed the directions on the following website and have everything set up with variables, and it works great: http://stackoverflow.com/questions/6190578/how-to-import-excel-files-with-different-names-and-same-schema-into-database What I need to do now is have a way to redirect an error. If there is an Excel file that fails on import, I want the Excel file moved from the source location to a new folder, so that I know which Excel files were not imported. I want the Excel files that WERE imported to move to a separate archive folder so that I know it was successful. I don't know how to set this sort of Error handling up. The Control Flow contains a ForEach loop, Data Flow, and File System Task. The Data Flow contains an Excel Source, Data Conversion, and OLE DB Destination. I can provide additional details if needed.
June 25th, 2012 5:21pm

One way is to use the red data flow signifying an error connected to a File System Task (FST) set to move a file based on a variable set to file name + path in the ForEach loop, another FST that moves it after a successful processing. This approach is similar to http://sqlserverselect.blogspot.ca/2010/12/ssis-foreach-loop-container-continue-on.htmlArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2012 5:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics