How to move file in archive folder when package failed in ssis.

  • Hi All,

    I have one scenario I create one package in which file is coming at daily basis and data is load in table but in case bad data will come and it fails to load data in table in that case file should be move at error archive folder and that source location will be free for next file. it get copy but i want to move file permanently at error archive folder when package get failed .

    So please anybody look into this..

    Thanks in Advance..

  • Hi,

    If you're already copying the file then can't you just change the file system task to complete a "Move File" operarion rather than a "Copy File" one?

    Or have i mis-understood your problem?

    Thanks,

    Simon



    MCSE: Data Platform
    MCSE: Business Intelligence
    Follow me on Twitter: @WazzTheBadger
    LinkedIn Profile: Simon Osborne

  • actually it hold the file so moving file is not possible but copying is done but we have to move it.

  • Is the file system task in an event handler, or is it a separate task on the control flow?

    Thanks,

    Simon



    MCSE: Data Platform
    MCSE: Business Intelligence
    Follow me on Twitter: @WazzTheBadger
    LinkedIn Profile: Simon Osborne

  • it is a separate task on control flow...

  • OK so try doing a "Move File" file system task in an OnError event handler on the data flow.

    Thanks,

    Simon



    MCSE: Data Platform
    MCSE: Business Intelligence
    Follow me on Twitter: @WazzTheBadger
    LinkedIn Profile: Simon Osborne

  • Could you please elaborate the steps what you have try to saying.

  • Hi,

    So i've included a screenshot....

    There should be an event handlers tab when you open the package. On there you can select an event handler for a particular executable, or the entire package. Select you data flow in the executable drop down, then all you have to do is create a "Move File" file system task.

    Hope that helps a bit more.

    Thanks,

    Simon



    MCSE: Data Platform
    MCSE: Business Intelligence
    Follow me on Twitter: @WazzTheBadger
    LinkedIn Profile: Simon Osborne

  • Its working now ..

    Thanks:-)

  • Great!



    MCSE: Data Platform
    MCSE: Business Intelligence
    Follow me on Twitter: @WazzTheBadger
    LinkedIn Profile: Simon Osborne

Viewing 10 posts - 1 through 9 (of 9 total)

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