Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How can I debug a Bulk Insert error?

$
0
0

I'm loading a bunch of files into SQL server.  All work fine, but one keeps erroring out on me.  All files should be exactly the same in structure, but they have different dates, and other different financial metrics, but the structure and field names should be exactly the same.  Nevertheless, one keeps konking out, and throwing this error.


Msg 4832, Level 16, State 1, Line 1
Bulk load: An unexpected end of file was encountered in the data file.
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".


The ROWTERMINATOR should be CRLF, and when you look at it in Notepad++ that's what it looks like, but it must be something else, because I keep getting errors here.  I tried the good old:  ROWTERMINATOR='0x0a'

That works on all files, but one, so there's something funky going on here, and I need to see what SQL Server is really doing.

Is there some way to print out a log, or look at a log somewhere?

Thanks!!


Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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