HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How To Execute an Integration Services (SSIS) Package from a SQL Server Stored Procedure

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
storedpackagesqlssisprocedureservicesintegrationhowserverfrom

Problem

i am executing query like this on sql server 2008 R2

DECLARE @returncode int
EXEC @returncode = xp_cmdshell 'dtexec /f "C:\certs\SSIS Disposition\SSIS Disposition\SSIS Disposition\Package1.dtsx"'


and getting error

```
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.2500.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
NULL
Started: 12:08:21 AM
Error: 2014-03-21 00:08:21.71
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
Progress: 2014-03-21 00:08:22.66
Source: Data Flow Task 1
Validating: 0% complete
End Progress
Progress: 2014-03-21 00:08:22.69
Source: Data Flow Task 1
Validating: 50% complete
End Progress
Error: 2014-03-21 00:08:23.05
Code: 0xC0202009
Source: Package1 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 'wm_bulk'.".
End Error
Error: 2014-03-21 00:08:23.07
Code: 0xC020801C
Source: Data Flow Task 1 Destination - ACQ_DailyFeedStaging [220]
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 thi
s with more information on why the AcquireConnection method call failed.
End Error
Error: 2014-03-21 00:08:23.07
Code: 0xC0047017
Source: Data Flow Task 1 SSIS.Pipeline
Description: component "Destination - ACQ_DailyFeedStaging" (220) failed validation and return

Solution

It looks as though the package has been saved with sensitive data protected, meaning that it can only be run by specified users.

To fix it, set the PackageProtectionLevel to DontSaveSensitive and then re-deploy the package to the server.

Context

StackExchange Database Administrators Q#61415, answer score: 3

Revisions (0)

No revisions yet.