Bulk Insert error logging

  • I simply want to log any errors that occur in a Bulk Insert task.

    I'm simply going from a flat file to a table and it's all working fine, except for the error logging.

    I have logging set up and it's partially working - only a single error is reported.

    Say I have five rows in the input file and rows 3 and 5 have "bad" data (incorrect types, too long, whatever). When the Bulk Insert task runs, the "bad" records don't get inserted which is correct.

    The problem is that only the first errored line (row 3) gets reported and logged. How can I get ALL errors and warning to get logged?

    Cheers

  • One option I can think of is redirect error to flat file. Just use dataviewers to see how the bad rows gets directed.

    Thanks.,

  • I already have logging set up to redirect the errors to a flat file.

    problem is only the first error is getting thrown.

  • It turns out that I'm blind and the single error event that gets raised sends all of the errors in the ErrorDescription variable. So I just need to parse the line and extract the separate messages out of it. Not very neat but I guess it will have to do.

    Sorry for the mistake.

  • I just realised that I had set the batchsize to something greater than the number of rows in the input file, hence why multiple errors were being put into the error description.

    If i set the batch size to 1, then only the first error gets reported.

    I'm thinking there must be another setting somewhere in there which will get me what I want - a separate error for each bad row in the file.

Viewing 5 posts - 1 through 4 (of 4 total)

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