I've got an odd one here.
I have a package that copies some data from one SQL server database to another, into staging tables. That data is then transformed and copied into live tables. This is all done via an SSIS package run by a SQL job.
It has been completely solid for months. This morning the job failed with the unhelpful "DTS_E_PRIMEOUTPUTFAILED" error in the SQL job, at the part where it copies the data into staging.
So I ran it manually from BIDS and it worked without any errors. Odd, I thought. I then ran it manually from the server where it executes, but via the SSIS execution tool rather than the SQL job. No errors.
However, when I run it from the job, it fails. It always partially copies the data (1158 rows should be copied, so not a lot of data) but fails after 813 rows. I have looked at the data in row 814 and it all looks fine.
I am logged into the server with the same account that the SQL job runs under - it uses a credential mapped to a domain account.
So I temporarily put a restriction in to not import the row at 814, and now it works!! (it imports 1157 rows)
There are other tasks in the package that copy way more rows than this, and they are working fine.
So: -Why does it work manually but not from the job? -What is it about row 814 that's odd? I have copied the whole dataset into Excel, and there is nothing in that row that is odd, I am sure of it. And if there was something odd, why would it only affect the package when run from the job and not manually?
Finally, I put the row 814 back in, and took out another row at random, and it works!!
If I force an additional row in, it also works.
So it for some reason doesn't like the number of rows it's importing to be 1158! (but only when run via a SQL job)
I am completely stumped.
SELECT TOP 1158 * FROM sys.all_columns AS AC;
Even accounting for off by one, it's a simple thing to verify. Therefore, let's examine the facts, starting with your error. Based on my searching, it's usually a source driver issue but since you're going SQL Server to SQL Server, that seems less likely to be defective. Could you help us understand your scenario? What tasks are you using to transfer the data? What are your connection managers (ADO, OLE, ODBC, something else). Source and target DB version? Any other oddities we should know about (VPNs, cross domain, linked servers, etc)? – billinkc Oct 3 '14 at 14:51