SSIS, Bulk Insert Task fails when fired from console application

0

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 which run successfully are using an ADO.NET connection whereas the Bulk Insert Task is using OLEDB. Will this have anything to do with it?

.net
visual-studio
ssis
asked on Stack Overflow Feb 7, 2011 by youwhut • edited Feb 7, 2011 by youwhut

3 Answers

1

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.

answered on Stack Overflow Feb 7, 2011 by Scott Chamberlain
0

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.

answered on Stack Overflow Feb 16, 2011 by Michael Cox
0

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.

answered on Stack Overflow Mar 14, 2011 by youwhut

User contributions licensed under CC BY-SA 3.0