File was deleted without loading-FTP Task

  • Hello

    I have a simple ssis package with the following 3 components

    1. FTP Task1 ----> receives file from the ftp site.

    2. Data flow task ---> processes and load the file to the SQL table.

    3. FTP Task2 ----> deletes file to the ftp server.

    yesterday, the package started at 1:54:11 PM and ended at 1:55:23 PM, executed successfully as seceduled and loaded 5 order files. However, another new order file hit the the ftp server at 1:54:44 PM which was deleted at 1:55:23 PM without loading to the database.

    How prevent this error in SSIS?

    Thanks

  • Ganesh Lohani (6/29/2010)


    Hello

    I have a simple ssis package with the following 3 components

    1. FTP Task1 ----> receives file from the ftp site.

    2. Data flow task ---> processes and load the file to the SQL table.

    3. FTP Task2 ----> deletes file to the ftp server.

    yesterday, the package started at 1:54:11 PM and ended at 1:55:23 PM, executed successfully as seceduled and loaded 5 order files. However, another new order file hit the the ftp server at 1:54:44 PM which was deleted at 1:55:23 PM without loading to the database.

    How prevent this error in SSIS?

    Thanks

    Look at the logic within Task2, your delete task was clearly not expecting a file to be added so late, and simply deletes all files in the folder. From an operational point of view you should either impose a cut-off point after which no new order files can be processed on that day, OR you need to add a Foreach Loop container, configuring it to pass the filenames found to a variable, which is then polled by the deletion job on each iteration of the loop, for which files to delete. This ensures that ONLY those files processed by the package are then deleted.

    As for how to implement...I'll let someone else help you, sadly that's all I know!!

    Good luck!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply