Skip to content
Advertisement

Determine ROW that caused “unexpected end of file” error in BULK INSERT?

i am doing a bulk insert:

and am getting the following error:

is there a way to know on which ROW this error occurred?

i am able to import 10,000,000 rows without a problem and error occurs after that

Advertisement

Answer

To locate the troublesome row use the errorfile specifier.

myRubbishData.log will have the offending rows and a companion file myRubbishData.log.txt will give you row numbers and offsets into the file.

Companion file example:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement