I'm trying to load 35 million records using bulk insert. The bulk
insert works fine in 2000 but fails in 2005.
BULK INSERT [TESTDB].[dbo].[tblTEST]
FROM 'C:\Test.Dat'
WITH
(BATCHSIZE = 10000,
FIELDTERMINATOR='|',
ORDER
(Company_Code,Main_Account,Sub_Account,Location_Ty pe,Location_Code,Journal_Date,Code)
)
2 Lines of Data:
1| 988| 1|W| 100|01 Jan 2049|1|Y|Y|N||Y|N|01 Jan
2049|Y|N| 1|JE|Operator| | | | 100|
Quote:
|| |N|N|0|0.0000|0.0100|0.00|0.00 |
1| 509| |P| 1248|18 Apr 2001|2|Y|Y|Y|25 Apr
2001|Y|Y|18 Apr 2001|Y|Y| 1248|RV|OPERATOR | 337316|P|
1248| 1723101| | ||DEPOSIT|N|N|0|334.5700|334
I get the following error after the first 10,000 records are inserted
Msg 4892, Level 16, State 1, Line 3
Bulk insert failed due to a schema change of the target table.
The only way it works if I set the batch size to 10 or under. Setting
it to 5000, 1000 or even 500 gives me the same error. There are no
other processes or changes being made to the table. This is a strict
test so nothing is even touching the database other than this bulk
insert inserting into this table.
Please help because there doesn't seem to be any information about
this.