敏感的SSIS程序包参数字符串中的特殊字符使程序包无效 [英] Special character in Sensitive SSIS Package Parameter String renders package invalid

查看:207
本文介绍了敏感的SSIS程序包参数字符串中的特殊字符使程序包无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SSIS包上有一个敏感的字符串参数,该参数用于存储远程服务器的密码.

I have a Sensitive String Parameter on an SSIS Package that is used to store a password for a remote server.

但是,当字符串值包含花括号时,作业代理在配置该步骤的包装参数"时会抛出错误:

However, the Job Agent throws an error whilst configuring the Package Parameters of that step when the string value contains a curly brace:

Microsoft SQL Server Management Studio:在命令行参数中检测到错误,请确保正确设置了所有参数. (SqlManagerUI)

Microsoft SQL Server Management Studio: Errors were detected in the command line arguments, please make sure all arguments are set correctly. (SqlManagerUI)

当在Visual Studio数据工具中直接执行该程序包时,或者从密码中删除{时,或者将String配置为常规的非敏感字符串时,该程序包都起作用.我不能简单地更改密码,因为它是由第三方提供的,并且确实希望保持原样.

The package works when it is directly executed in Visual Studio Data Tools, or when the { is removed from the password, or when the String is configured as a regular, non-sensitive string. I cannot simply change the password since it is provided by a 3rd party and really would like to keep the configuration as is.

我认为此问题与是否有办法修复?我试图逃避{,但无济于事.

Is there a way to fix this? I tried to escape the { but to no avail.

推荐答案

我有一些带有花括号的密码,但从未遇到过此问题.我正在做的另一件事是使用环境变量.我所有的连接字符串,密码,文件路径以及随环境而变化的其他参数都在环境变量中.然后,将SSIS包中的每个参数映射到相应的环境变量.

I have some passwords with curly braces and have never experienced this issue. One thing that I am doing differently is using Environment Variables. All my connection strings, passwords, file paths, and other parameters that change from environment to environment are in environment variables. Each parameter in the SSIS package is then mapped to the corresponding environment variable.

因此,请尝试我的方法:

So to try my method out:

  1. 创建环境
  2. 创建与参数相对应的变量
  3. 在项目中添加对环境的引用
  4. 在作业的配置"标签上,选择环境

如果您对上述任何步骤有任何疑问,请告诉我,我可以尝试提供一些其他详细信息.

If you have any questions about any of those steps, let me know and I can try to provide some additional details.

这篇关于敏感的SSIS程序包参数字符串中的特殊字符使程序包无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆