带有SSIS包的SQL Server作业 - 无法解密受保护的XML节点“DTS:Password”,错误为0x8009000B

时间:2013-06-22 07:51:17

标签: sql-server-2008-r2

我有一个运行SSIS包的SQL服务器作业。此作业有9个步骤,每个步骤都从不同的数据库中提取数据。连接字符串在每个步骤中定义为参数。

我在运行这份工作时遇到以下错误。

Executed as user: USER\MYSERVER$. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started:  5:50:55 PM  Error: 2013-06-21 17:50:55.44
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-06-21 17:50:55.45
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-06-21 17:50:55.45
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-06-21 17:51:06.30
Code: 0xC020901C
Source: Data Flow Task Daily Attendance View 1 [34]
Description: There was an error with output column "ShiftCode" (54) on output "OLE DB Source Output" (45). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".  End Error  Error: 2013-06-21 17:51:06.30
Code: 0xC020902A
Source: Data Flow Task Daily Attendance View 1 [34]
Description: The "output column "ShiftCode" (54)" failed because truncation occurred, and the truncation row disposition on "output column "ShiftCode" (54)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.  End Error  Error: 2013-06-21 17:51:06.30
Code: 0xC0047038
Source: Data Flow Task SSIS.Pipeline
Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Daily Attendance View 1" (34) returned error code 0xC020902A.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  5:50:55 PM  Finished: 5:51:06 PM  Elapsed:  10.983 seconds.  The package execution failed.  The step failed.

有人可以告诉我为什么会这样吗?

6 个答案:

答案 0 :(得分:37)

Kiran's answer建议的内容外,请确保正确设置:

SSIS中有一个选项可以保存密码(访问数据库或其他任何东西),默认设置是“EncryptSensitiveWithUserKey”......你需要改变它。

包装设施窗口> ProtectionLevel - 将其更改为EncryptSensitiveWithPassword PackagePassword - 输入密码 - > somepassword

答案 1 :(得分:11)

将项目和包属性ProtectionLevel更改为" DontSaveSensitive "

答案 2 :(得分:10)

这是因为SSIS包的创建者是其他人而其他人正在执行包。

如果假设一个人创建了SSIS包并且B人试图执行而不是出现上述错误。

您可以通过将包属性中的创建者名称从A更改为B来解决错误。

谢谢, Kiran Sagar

答案 3 :(得分:2)

比赛迟到但我找到了一种方法可以解决这个问题,我没有在其他任何地方看到过。从Connection Manager选择您的连接。在右边你应该看到属性。如果不添加表达式,请检查是否有任何表达式。在你的包浏览器中添加一个名为connection的变量到sql或者其他。将变量设置为字符串并将值设置为连接字符串,并包括用户标识和密码。返回连接管理器属性和表达式。从下拉列表中选择ConnectionString并将第二个框设置为变量的名称。看起来应该是这样的

enter image description here

我不能为我的生活找到另一个解决方案,但这有效!

答案 4 :(得分:0)

对我来说,问题与分配给程序包的参数有关。

 In SSMS, Navigate to:
 "Integration Services Catalog -> SSISDB -> Project Folder Name -> Projects -> Project Name" 

确保右键单击“项目名称”,然后确认正确设置了32位运行时,并且正确实例化了默认使用的参数。检查参数名称和初始值。对于我的包,我使用的值不正确,因此在执行我的包之前,必须重新填充默认参数。根据您在SSIS软件包中设置的参数所设置的默认值,检查所使用的值。一旦匹配,就应该解决该问题(部分)

答案 5 :(得分:0)

在我的情况下,这是因为第一次打开解决方案时我尚未连接到数据库。单击连接管理器选项卡,建立与该选项卡中每个数据源的连接,运行项目