dbTalk Databases Forums  

Bulk Insert SQL 2005 Failed

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Bulk Insert SQL 2005 Failed in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
carmaboy@gmail.com
 
Posts: n/a

Default Bulk Insert SQL 2005 Failed - 01-20-2006 , 08:29 AM






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.



Reply With Quote
  #2  
Old   
jashan
 
Posts: n/a

Default Re: Bulk Insert SQL 2005 Failed - 09-21-2006 , 10:25 AM







Since I'm having the same problem with about 500000 rows to be imported,
I was wondering if you came across a solution to this problem?

I can use batch sizes of 10000 and below and it still works, but when I
go significantly higher (e.g. 50000), I get the same problem.

Anybody with any ideas?


--
jashan



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.