SQL Server 2014,SSDT:正在部署 .dtsx 包,连接管理器和变量存在问题

SQL Server 2014, SSDT : deploying .dtsx packages to live, problems with connection managers & variables

总结: 一个 "master" 数据库包含一组连接字符串。 .dtsConfig XML 文件用于将包指向该数据库。通过在连接上使用包变量和表达式来完成动态连接分配。在开发环境中完美运行,但一旦部署到现场,它就会崩溃。

我目前 运行 在将 .dtsx 包部署到生产环境时遇到问题。该问题与作业 运行 时的连接管理器特别相关。历史日志报告 ... network ... 错误,原因是 Login timeout 错误。

(作为参考,我使用 Visual Studio 2013 和 SQL 服务器数据工具)

  1. 我在 master 数据库中有一个 table,用于保存它需要处理的连接字符串。

  2. 包检查配置文件,将它们指向 (1) 中规定的数据库。

  3. 检索连接并将其放置在对象变量中。

  4. 变量映射到一个foreach循环容器,其中一组连接字符串变量映射到相关列。

  5. 包然后正常进行。

一些注意事项:

  1. 当我进行开发时,我在我的网络上为连接字符串提供了默认值。

  2. 我检查了数据库内部的连接字符串参数和格式,符合微软的规范。

  3. 我们的实施者在客户的 QA 服务器上安装了 SSDT,我在其中更改了连接变量以指向他们的网络。这解决了问题,但它是不可持续的(至少在我看来)。

所以我的问题是:如何让我的生产部署与动态连接管理分配一起正常工作,而不必更改每个客户端上每个包内的连接字符串变量依据?

任何帮助将不胜感激。

通过向 DuckDuckGo 提出大量问题进行更多研究后,我终于得到了答案 here

引自上述博客:

I had a set of SSIS packages running for my client using the third option listed above. The packages worked fine for ages until one fine day when they failed. The logs showed the packages had failed validation and I discovered that all the packages had their connection managers’ DelayValidation property set to False. The variable used to set the connection string had a default value pointing to the DEV server. These packages in production were actually trying to validate against DEV database though the connection string was dynamically set via a variable to point to PROD. This was dangerous as the jobs will not run if DEV server was down, which is exactly what had occurred.