Thursday, March 8, 2012

Bulk Insert Error

Simple test project. Created Flat File connection, database connection (both local), and Bulk Insert Task. When running the package I get the following error:

[Bulk Insert Task] Error: An error occurred with the following error message: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.Bulk load: An unexpected end of file was encountered in the data file.".

I've tried different settings for the Flat File config, and the database connection, but still get the error. Any suggestions would be helpful.

Tks.

Have you looked into the error message? Specifically the part about the task encountering an unexpected end of file?|||Yes. The file seems fine. The Flat File connection tool reads the file fine (i.e. it displays the records appropriately when creating the connection). I can read this file with any number of other tools (e.g. import into Excel).|||

Here's what you can do to narrow down the problem:

1. Use Profiler to capture the bulk insert statement generated by the bulk insert task.

2. Look at the options in the bulk insert statement to make sure they are correct. You may get this error if the options, like row delimiter, are not set correctly. In that case, you can change them in the bulk insert task UI.

You can also run the bulk insert statement outside of SSIS (e.g. Management Studio) to make sure the statement is correct.

No comments:

Post a Comment