Keep a lock on flat file destination between dataflow tasks

  • Guys,

    I have a flat file which gets written in three parts (generic header, specific lines, generic footer with a rowcount from the lines). We experienced a 1:1000000 error last week whereby the FTP polling process (not in SSIS) grabbed the file in the fraction of a second between the header finishing and the lines starting. The FTP process is already designed to not try the transfer if it can't get an exclusive lock. In this instance is did get XL and the SSIS package failed because the file was in use by another process.

    Is there any way to maintain the lock on the file when the first and second tasks stop writing and release it on the completion of the the 3rd task. I have 37 outputs that all do basically the same thing and don't really want to have to re-write them all 🙂

    FYI this is in SSIS2008

  • aaron.reese (10/22/2013)


    Guys,

    I have a flat file which gets written in three parts (generic header, specific lines, generic footer with a rowcount from the lines). We experienced a 1:1000000 error last week whereby the FTP polling process (not in SSIS) grabbed the file in the fraction of a second between the header finishing and the lines starting. The FTP process is already designed to not try the transfer if it can't get an exclusive lock. In this instance is did get XL and the SSIS package failed because the file was in use by another process.

    Is there any way to maintain the lock on the file when the first and second tasks stop writing and release it on the completion of the the 3rd task. I have 37 outputs that all do basically the same thing and don't really want to have to re-write them all 🙂

    FYI this is in SSIS2008

    How about a simple alternative approach? Output the file to a different file name/location and then do a rename/move to the current file name as the final step in the process?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

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

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