Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Import of table stops at 97k rows

Author  Topic 

tmccar
Starting Member

27 Posts

Posted - 2011-09-07 : 16:24:06
I have a text file of 117,000 records and I'm trying to upload it to a table in my database using Import/Export wizard. But try asI might, I can't get it past 97,342 rows. The line in the file looks ok - I don't see any problem with it.

Tom Mc Carrick

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-07 : 16:35:25
How did you determine the "line in the file looks ok"? Did you use a hex editor? It sounds like you've got an EOF character in there.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tmccar
Starting Member

27 Posts

Posted - 2011-09-07 : 16:52:01
How can I check this?

Tom Mc Carrick
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-07 : 16:55:20
Download a hex editor to view exactly what is in that line. Google "hex editor".

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tmccar
Starting Member

27 Posts

Posted - 2011-09-07 : 17:14:39
Ok, I've loaded the file in the editor - what should I look for?

desperately seeking data
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-09-07 : 17:18:06
See if there's an EOF character around that line number. I forget what an EOF looks like though.

If nothing is wrong with that line, then I would suggest bcp.exe which is a command line import/export tool.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tmccar
Starting Member

27 Posts

Posted - 2011-09-08 : 11:38:57
I've been trying bcp for a while now and it's failing with this error:

Starting copy...
SQLState = 22001, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]String data, right truncation
SQLState = 22001, NativeError = 0

Here's the command I am using:

bcp dataease2.dbo.lDrawings in "c:\extracteddata\sk.drawings.txt" -SAPRDU-LT050\SQLEXPRESS -T -n
Go to Top of Page
   

- Advertisement -