Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Inconsistent Bulk Insert result

$
0
0
I am using SQL Server 2005 Enterprise edition

I have a BULK INSERT solution that uses a number of format files to load data.  Each format file is used to load a source file into a separate table.  The solution uses a stored procedure that is initiated from a SQL agent job.  This stored procedure loops through each file to load and calls another stored procedure to actually load the file.  All format files are correct and work.  Most of the time, i can load all the record types. 

However, every 10-15 times to solution runs i receieve an error stating:

Cannot bulk load. Invalid destination table column number for source column 1 in the format file C:\<some format file>.fmt

Once this error starts and i re-run the stored procedure, it continues for another 5 or so times and then all files will load again.  I can only think the format files have been locked in some way meaning the next record type to load (which may re-use an already used format file) cannot obtain the format file to load.

Can someone suggest either why this may be happening (i'm aware the detail is a little sparse) based on previous experience :-).  Or, maybe someone can suggest how i may investigate this further using some external tools (profiler???).

Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>