SQL SSIS 问题无法解密受保护的 XML 节点

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9297018/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 14:24:05  来源:igfitidea点击:

SSIS issue Failed to decrypt protected XML node

sqlsql-serversql-server-2008ssis

提问by Neo

I created an SSIS package which is having ftp pull files from ftp server and save to my local drive but I'm getting this issue.

我创建了一个 SSIS 包,它从 ftp 服务器中提取 ftp 文件并保存到我的本地驱动器,但我遇到了这个问题。

With same error message I was getting only warning but today the job fails.

使用相同的错误消息,我只收到警告,但今天作业失败了。

Message:

信息:

Executed as user: cam\Package.Runner. 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: 10:00:00 AM Error: 2012-02-15 10:00:00.61 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: 2012-02-15 10:00:00.62 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Property" 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: 2012-02-15 10:00:33.53 Code: 0xC0029183 Source: Principal Balance File FTP Get FTP Task Description: File represented by "/Concerto/Virtus_Reports/Concerto Principal Balance Report*.pdf" does not exist. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 10:00:00 AM Finished: 10:00:33 AM Elapsed: 33.088 seconds. The package execution failed. The step failed.

以用户身份执行:cam\Package.Runner。适用于 64 位的 Microsoft (R) SQL Server 执行包实用程序版本 10.0.4000.0 版权所有 (C) Microsoft Corp 1984-2005。版权所有。开始时间:上午 10:00:00 错误:2012-02-15 10:00:00.61 代码:0xC0016016 来源:描述:无法解密受保护的 XML 节点“DTS:密码”,错误为 0x8009000B“密钥在指定状态下无效.”。您可能无权访问此信息。当存在加密错误时会发生此错误。验证正确的密钥是否可用。结束错误错误:2012-02-15 10:00:00.62 代码:0xC0016016 来源:描述:无法解密受保护的 XML 节点“DTS:Property”,错误为 0x8009000B“密钥在指定状态下无效。”。您可能无权访问此信息。当存在加密错误时会发生此错误。验证正确的密钥是否可用。End Error 错误:2012-02-15 10:00:33.53 代码:0xC0029183 来源:Principal Balance File FTP Get FTP 任务描述:“/Concerto/Virtus_Reports/Concerto Principal Balance Report*.pdf”表示的文件不存在。结束错误 DTExec:包执行返回 DTSER_FAILURE (1)。开始:上午 10:00:00 结束:上午 10:00:33 经过:33.088 秒。包执行失败。步骤失败。包执行返回 DTSER_FAILURE (1)。开始:上午 10:00:00 结束:上午 10:00:33 经过:33.088 秒。包执行失败。步骤失败。包执行返回 DTSER_FAILURE (1)。开始:上午 10:00:00 结束:上午 10:00:33 经过:33.088 秒。包执行失败。步骤失败。

采纳答案by Anup Kulkarni

You can fix this issue by setting the Protection Level property

您可以通过设置保护级别属性来解决此问题

Protection Level : DontSaveSensitive

With this property, the package will not be password protected, and another server can access and execute any job with other credentials.

使用此属性,包将不受密码保护,另一台服务器可以使用其他凭据访问和执行任何作业。

回答by Bassam Gamal

While importing the package to SQL Server choose Protection Level: Either

将包导入 SQL Server 时,选择保护级别:要么

1- Don't save sensitive data.

1-不要保存敏感数据。

Or

或者

2- Rely on Server Storage and roles for access control.

2- 依靠服务器存储和角色进行访问控制。

Screenshot from SSIS ProjectPackage Properties:

SSIS 项目包属性的屏幕截图:

enter image description here

在此处输入图片说明

回答by user2820151

Before Building and deploying the package, please be sure you've changed the property of the solution like this :

在构建和部署包之前,请确保您已更改解决方案的属性,如下所示:

   Run64BitRuntime = False

回答by JohnN

I got the same error message for FTP Connections. I think it was caused by me opening the Package while running BIDS under different credentials to those I created it with.

我收到了相同的 FTP 连接错误消息。我认为这是由于我在与我创建它的凭据不同的凭据下运行 BIDS 时打开包造成的。

As a clunky workaround I deleted and re-created the FTP Connection. It worked fine afterwards.

作为一个笨拙的解决方法,我删除并重新创建了 FTP 连接。后来它工作得很好。

回答by Branislav

Main part of your SSIS job error is

您的 SSIS 作业错误的主要部分是

" 0xC0029183 Source: Principal Balance File FTP Get FTP Task Description: File represented by "/Concerto/Virtus_Reports/Concerto Principal Balance Report*.pdf" does not exist. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 10:00:00 AM Finished: 10:00:33 AM Elapsed: 33.088 seconds. The package execution failed. "

" 0xC0029183 Source: Principal Balance File FTP Get FTP Task Description:由“/Concerto/Virtus_Reports/Concerto Principal Balance Report*.pdf表示的文件不存在。结束错误DTExec:包执行返回DTSER_FAILURE (1)。开始:10 :00:00 AM 完成:10:00:33 AM 经过:33.088 秒。包执行失败。”

It seems that you don't have pdf file on path you have configured in your SSIS package. Please,check up path and pdf files for import. Best regards, Branislav

您在 SSIS 包中配置的路径上似乎没有 pdf 文件。请检查路径和pdf文件以进行导入。最好的问候, 布拉尼斯拉夫

回答by Veer

Please try save your package with the option "EncryptSensitiveWithPassword".

请尝试使用“EncryptSensitiveWithPassword”选项保存您的包。

Step-1: Right click on your FTP connection manager, go to its Properties (the very bottom, not the Edit button), and type in the password.

步骤 1:右键单击您的 FTP 连接管理器,转到其“属性”(最底部,而不是“编辑”按钮),然后输入密码。

Step-2: Save your package with EncryptSensitiveWithPassword.

第 2 步:使用 EncryptSensitiveWithPassword 保存您的包。

Step-3: Now edit the command ling in SQL job agent as below /FILE "C:\Fullpath of SSIS pkg.dtsx" /DECRYPT password

步骤 3:现在编辑 SQL 作业代理中的命令如下 /FILE "C:\Fullpath of SSIS pkg.dtsx" /DECRYPT password

回答by HARSHIT RATHORE

In case of FTP Connection, you can just create one Script Task before FTP task and set a password for that for example

如果是 FTP 连接,您可以在 FTP 任务之前创建一个脚本任务并为其设置密码,例如

ConnectionManager FTPConn;

连接管理器 FTPConn;

FTPConn = Dts.Connections["FTP Connection Manager"];

FTPConn = Dts.Connections["FTP 连接管理器"];

FTPConn.Properties["ServerPassword"].SetValue(FTPConn,Dts.Variables["FtpPwd"].value);

FTPConn.Properties["ServerPassword"].SetValue(FTPConn,Dts.Variables["FtpPwd"].value);

and in case of OLE DB you can just add password in the connection string of OLEDB Connection.

如果是 OLE DB,您只需在 OLEDB 连接的连接字符串中添加密码即可。

回答by Miki G

This are the steps that worked for me.

这是对我有用的步骤。

  1. copied the package to another folder (just to be safe)
  2. Set the Protection Level to EncryptAllWithPassword and gave it a Password like 'Test'
  3. changed the creator Name to another User that I created
  4. Recreated the job
  5. created a Proxy to run the job
  1. 将包复制到另一个文件夹(为了安全)
  2. 将保护级别设置为 EncryptAllWithPassword 并给它一个像“测试”这样的密码
  3. 将创建者名称更改为我创建的另一个用户
  4. 重新创建了工作
  5. 创建了一个代理来运行作业

Worked!!

成功了!!