• Stan Kulp-439977 (8/7/2014)


    shah.muhammad (8/7/2014)


    Bulk Insert works in most cases but if your operation is based on sequence, you can't rely on bulk insert as it loads the data from the file regardless of sequence. we had quiet a few issues with this.

    That's good to know. I wonder why that is?

    It is because once a batch of rows is submitted to SQL Server it is up to the database engine to decide how that data is applied to the table. If you submit a batch of 1000 rows the engine may commit part of the batch of data before another one if it happens to split the batch and send rows to different CPUs for insert into the table. The only way to avoid data in your batches from being committed to your table in an order other than how it was read from the file is to submit a batch containing only a single row.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato