34

我有一个运行 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.

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

4

6 回答 6

48

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

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

Package Proprties Window > ProtectionLevel -- 将其更改为 EncryptSensitiveWithPassword PackagePassword -- 输入密码-> somepassword

于 2014-05-08T15:56:18.633 回答
15

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

于 2015-05-14T10:16:03.413 回答
12

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

如果假设 A 人已经创建了 SSIS 包并且 B 人正在尝试执行,那么就会出现上述错误。

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

谢谢,基兰萨加尔

于 2013-10-17T08:32:53.360 回答
3

比赛有点晚了,但我找到了一种方法来为我解决这个问题,这是我在其他任何地方都没有见过的。从连接管理器中选择您的连接。在右侧,您应该看到属性。检查是否有任何表达式,如果没有添加一个。在您的包资源管理器中添加一个名为 connection to sql 或其他变量的变量。将变量设置为字符串并将值设置为您的连接字符串并包括用户 ID 和密码。回到连接管理器属性和表达式。从下拉列表中选择 ConnectionString 并将第二个框设置为变量的名称。它应该看起来像这样

在此处输入图像描述

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

于 2018-02-13T22:21:27.170 回答
0

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

于 2019-02-21T20:35:55.303 回答
0

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

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

确保您右键单击“项目名称”,然后验证 32 位运行时设置是否正确以及默认使用的参数是否已正确实例化。检查参数名称和初始值。对于我的包,我使用了不正确的值,因此我必须在执行包之前重新填充参数默认值。根据您为在 SSIS 包中设置的参数设置的默认值检查您使用的值。一旦这些匹配,问题应该得到解决(对于某些人)

于 2018-09-10T20:49:11.537 回答