开发者

SSIS, Bulk Insert Task fails when fired from console application

I have a package which executes several tasks including a Bulk Insert Task. This is okay when run from Visual Studio. I have a console application which will run the same package but fails when doing the bulk insert with:

An error occurred with the following error message: "SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".".

Visual Studio and the console application are both running as the same user which has the role sysadmin. The same package creates some tables before bulk insert which is successful in both cases.

Any help will be much appreciated.

UPDATE: The tasks w开发者_运维问答hich run successfully are using an ADO.NET connection whereas the Bulk Insert Task is using OLEDB. Will this have anything to do with it?


This is just a shot in the dark...

Double check the file path's to the bulk insert file you are passing to the server, the environment variables can be very different when running it inside the debugger (it is most likely the working directory is set inside VS but not when you are running it inside the console). Changing the file from a relative path to a full path may fix it.


Check the output columns in the OLEDB source using Advanced Edit. Check the data types and lengths, look for any mismatches between source and target.


Something was interfering with the OLEDB connection which I did not have time to fully investigate - maybe a GPO...?

Rather than an OLEDB connection an ADO.NET connection was utilised which meant I had to use a SQL Task instead of a BULK INSERT task.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜