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

发布于 2025-01-05 21:25:45 字数 796 浏览 1 评论 0原文

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

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

信息:

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

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.

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

酒绊 2025-01-12 21:25:45

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

Protection Level : DontSaveSensitive

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

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.

白龙吟 2025-01-12 21:25:45

将包导入 SQL Server 时选择保护级别:
1-

不要保存敏感数据。

或者

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

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

在此处输入图像描述

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

1- Don't save sensitive data.

Or

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

Screenshot from SSIS Project Package Properties:

enter image description here

初见你 2025-01-12 21:25:45

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

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

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

步骤 3:现在在 SQL 作业代理中编辑命令,如下所示
/FILE "C:\SSIS pkg.dtsx 的完整路径" /DECRYPT 密码

Please try save your package with the option "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.

Step-2: Save your package with EncryptSensitiveWithPassword.

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

二智少女 2025-01-12 21:25:45

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

   Run64BitRuntime = False

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

   Run64BitRuntime = False
葵雨 2025-01-12 21:25:45

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

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

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.

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

Oo萌小芽oO 2025-01-12 21:25:45

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

“ 0xC0029183 来源:本金余额文件 FTP 获取 FTP 任务说明:由“/Concerto/Virtus_Reports/Concerto 本金余额报告*.pdf”表示的文件不存在。结束错误 DTExec:包执行返回 DTSER_FAILURE (1) 开始:上午 10:00:00 完成: 10:00:33 AM 已用时间:33.088 秒。“包执行失败。”

您在 SSIS 包中配置的路径上似乎没有 pdf 文件。
请检查导入路径和 pdf 文件。
此致,
布拉尼斯拉夫

Main part of your SSIS job error is

" 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. "

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

淤浪 2025-01-12 21:25:45

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

ConnectionManager FTPConn;

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

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

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

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

ConnectionManager FTPConn;

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

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.

望喜 2025-01-12 21:25:45

这是对我有用的步骤。

  1. 将包复制到另一个文件夹(只是为了安全起见)
  2. 将保护级别设置为 EncryptAllWithPassword 并给它一个类似“测试”的密码
  3. 将创建者名称更改为我创建的另一个用户
  4. 重新创建了作业
  5. ,创建了一个代理来运行该作业 工作

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

Worked!!

北方的巷 2025-01-12 21:25:45

如果您的项目有其他包,那么更改“ProtectionLevel”可能并不明智。此外,如果它有其他包并且您想更改“ProtectionLevel”,那么您必须为所有其他包更改它。

解决方案可以是使用“变量”作为“服务器密码”。

  1. 右键点击控制流(任意空白处)->单击“变量”
  2. 单击“变量”窗口左上角的“添加变量”。
  3. 定义“名称”和“范围”。选择“数据类型”为“字符串”。在“值”中输入您的密码。
  4. 现在转到“FTP 连接管理器”的属性。
  5. 单击“表达式”。然后单击该行右侧的三个点“...”。它将带来“属性表达式”窗口。
  6. 选择“ServerPassword”作为行的“属性”。
  7. 对于该行,转到“表达式”列并单击三个点“...”。
  8. 在“表达式生成器”窗口中,转到“表达式:”子窗口。拖放您创建的变量。单击“评估表达式”以检查该值是否有效。单击“确定”。

这样一来,这个 FTP 连接密码将不再受项目的“ProtectionLevel”影响,并且您不需要更改项目的其他 SSIS 包。

If your project has other packages, then it may not be wise to change the "ProtectionLevel". Moreover, if it has other packages and you want to change the "ProtectionLevel" then you have to change it for all other packages.

A workaround solution can be to use the "Variables" for the "ServerPassword".

  1. Right click on the control flow (any blank space) -> Click "Variables"
  2. Click "Add Variables" from the top left corner of "Variables" window.
  3. Define "Name", and "Scope". Choose "String" for "Data type". In the "Value" give your password.
  4. Now go to the properties of "FTP Connection Manager".
  5. Click "Expressions". Then click the three dots "..." from the right of that row. It will bring the "Property expressions" window.
  6. Choose "ServerPassword" as a "Property" for a row.
  7. For that row, go to the "Expression" column and click the three dots "...".
  8. In the "Expression Builder" window go to the "Expression:" subwindow. Drag and drop the variable you created. Click "Evaluate Expression" to check the value is working. Click "OK".

As a result, this FTP connection password will not be affected by the "ProtectionLevel" of the project anymore and you don't need to change the other SSIS packages of the project.

回忆那么伤 2025-01-12 21:25:45

当我通过 ODBC 更改到新迁移服务器的源数据连接后,遇到一个包突然无法正常工作时,我遇到了这个问题。然后我不断收到“与服务器的连接被强制关闭”的问题。我发现即使构建和 ODBC 连接器相同,相同的包仍然可以在 DEV 服务器上成功运行。因此,我决定从 DEV 系统中获取包并将其拉入 LIVE 系统中。

解决此问题的最简单方法是执行以下操作:

  • 将项目级别属性设置保留为“EncryptSensitiveDataWithUserKey”设置
  • 暂时将解决方案中的每个包从“EncryptSensitiveDataWithUserKey”更改为“DoNotSaveSensitive”。
  • 重建解决方案。这会产生项目不一致错误,表明项目的保护级别与以下项目不一致:”(显示 SSIS 包列表)。
  • 将每个包设置从“DoNotSaveSensitive”改回“EncryptSensitiveDataWithUserKey”并重建
  • 重建成功。

I had this issue when I came across a package not working properly all of a sudden after a change to the source data connection via ODBC to a new migrated server. Then I kept getting a "connection to the server was forcibly closed" issue. I discovered that the same package continued to run successfully on the DEV server even though the build and ODBC connectors were identical. So, I decided to fetch the package from the DEV system and pull it into the LIVE system.

The easiest way to overcome this issue is to do the following:

  • Leave the Project level Properties setting as "EncryptSensitiveDataWithUserKey" setting
  • Temporarily change each package in the solution from "EncryptSensitiveDataWithUserKey" to "DoNotSaveSensitive".
  • Rebuild the solution. This produces project inconsistency errors stating that the protection level of the project is inconsistent with the following items:" (A list of SSIS packages is presented).
  • Change back each package setting from "DoNotSaveSensitive" back to "EncryptSensitiveDataWithUserKey" and rebuild
  • Rebuild is successful.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文