SSIS package can be run using "Execute Package Utility" but not in an agent job?

0

I imported a SSIS package, which pump a local Sql server table to a remote Sql server, into MSDB SSIS storage and I can execute the package by right clicking and executing. However, it raises following error when I tried to run it in an agent job. The destination connection uses an Sql login on the remote Sql server.

Executed as user: Domain\MyLogin. Microsoft (R) SQL Server Execute Package Utility Version 10.0.4000.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 6:04:09 PM Error: 2013-05-01 18:04:09.75 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC0202009 Source: Reload_Table Connection manager "DestinationConnectionOLEDB" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D Description: "Login failed for user 'QA_USERS'.". End Error Error: 2013-05-01 18:04:10.31 Code: 0xC020801C Source: Data Flow Task 1 Destination - tmp_test [34] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "DestinationConnectionOLEDB" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC0047017 Source: Data Flow Task 1 SSIS.Pipeline Description: component "Destination" (34) failed validation and returned error code 0xC020801C. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC004700C Source: Data Flow Task 1 SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2013-05-01 18:04:10.31 Code: 0xC0024107 Source: Data Flow Task 1 Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 6:04:09 PM Finished: 6:04:10 PM Elapsed: 0.766 seconds. The package execution failed. The step failed.

sql-server
sql-server-2008
ssis
asked on Stack Overflow May 1, 2013 by ca9163d9

1 Answer

1

This happened to me before, and it is because you are using windows authentication in the SSIS package, that means that when you run it, it will use your Windows user, when you run it from the server it will use the server's user.

In other words, avoid using windows authentication in your SSIS and change it to a regular SQL user, that will fix your issues.

answered on Stack Overflow May 1, 2013 by Hiram

User contributions licensed under CC BY-SA 3.0