【发布时间】:2021-11-03 20:43:24
【问题描述】:
注意:我不是 SSIS 开发人员,对它的了解非常有限,因此可能会遗漏非常小的细节,请仔细阅读。
- 我有一个现有的 SSIS 包,其中一个步骤中有脚本任务。
- 我不得不在脚本任务中更新一个值,所以我在 notepad++ 中打开它并更新了值并保存了它。现在,当计划的 SSIS 作业运行时,它仍会选择旧值,而不是更新后的值。
- 我意识到脚本任务是一个 VB 文件,所以可能需要为二进制文件重新编译它。我读过它并发现,如果你通过 VS 打开它并保存它,VS 会自动编译它,你不需要做任何进一步的事情。我在这里可能是错的。
- 我不能在服务器上进行项目部署,所以我只需要更新的包文件来在服务器上替换它。(我从我创建的 Visual Studio 项目中获取这个更新的包文件来编辑 SSIS包。我不确定是否有其他方法可以获取包,或者即使这是一个正确的包。
现在的问题是,
- 当我使用 notepad++ 更新旧包时,它在运行计划作业时没有抛出任何错误,但它采用了旧值
- 现在,当我将使用 Visual Studio 编辑的新包放入时,它会抛出以下错误
Executed as user: sampleUser(nameupdated). Microsoft (R) SQL Server Execute Package Utility Version 13.0.5026.0 for 32-bit Copyright (C) 2016 Microsoft. All rights reserved. Started: 5:08:09 PM Error: 2021-11-02 17:08:10.83 Code: 0xC0016016 Source: OraclePackage 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: 2021-11-02 17:08:11.26 Code: 0x00000005 Source: Rename files in archive folder to _yyyymmddhhmm Rename files in archive folder to _yyyymmddhhmm Description: Failed to migrate scripts contained in the package to the VSTA 14.0 format. Move the scripts to a new Script task. End Error Error: 2021-11-02 17:08:14.19 Code: 0x00000005 Source: Script Task Script Task Description: Failed to migrate scripts contained in the package to the VSTA 14.0 format. Move the scripts to a new Script task. End Error Error: 2021-11-02 17:08:17.17 Code: 0x00000001 Source: Script Task Description: Exception has been thrown by the target of an invocation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 5:08:09 PM Finished: 5:08:17 PM Elapsed: 7.25 seconds. The package execution failed. The step failed.
我了解了这个错误,发现包的安全级别会导致这个问题,所以将包的保护级别从“EncryptSensitiveWithUserKey”更新为“DontSaveSensitive”
- 现在,当我运行项目时,出现以下错误
Executed as user: sampleuser(nameUpdated). Microsoft (R) SQL Server Execute Package Utility Version 13.0.5026.0 for 32-bit Copyright (C) 2016 Microsoft. All rights reserved. Started: 5:31:44 PM Error: 2021-11-02 17:31:53.93 Code: 0x00000001 Source: Script Task Description: Exception has been thrown by the target of an invocation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 5:31:44 PM Finished: 5:31:53 PM Elapsed: 9.047 seconds. The package execution failed. The step failed.
如果有其他方法可以直接编辑脚本任务并将其编译到位,以便它采用更新后的值,请告诉我,如果我还有其他事情可以做。
提前致谢。
【问题讨论】:
标签: ssis script-task