SSIS Random Failure reading from Excel

  • planetmatt wrote:

    1. How do you get the package to automatically try the failed file again?
    2. Do I need to set the MaxErrorCount on the Data Flow or the Package?

    I put the data-flow inside a sequence container inside the for each loop, with the on failure pointing to a truncate or delete from destination table then back to the data-flow. When the data-flow fails, it stays within the same sequence container and starts again. I set the MaximumErrorCount > 0 for the data-flow and set the Propagate variable to false in the data-flow event manager. This way the data-flow can fail, but if my delete from destination table fails it will fail the package. The sequence container and everything else retain the default MaximumErrorCount = 0.

    It might we a good idea to put in a 30 second wait before restarting the data-flow to allow the condition that caused the failure to change. This would mean that inside the sequence container the on-failure goes to the delete table, then on success to a sql task with a waitfor delay, plus any logging you might have, and then on success back to the data-flow.

  • then on success to a sql task with a waitfor delay

    Or a script task with a Thread.Sleep().

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Phil Parkin wrote:

    or a script task with a Thread.Sleep().

    Cheers for that. I assumed there was a better way of adding a delay, but never looked into it.

Viewing 3 posts - 16 through 17 (of 17 total)

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