SSIS配置连接字符串 [英] SSIS Configuration connection strings

查看:317
本文介绍了SSIS配置连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一些我们的包裹的问题。基本布局是连接字符串存储在数据库的SSIS配置表中。

I ran into a problem with some of our packages. The basic layout is the connection strings are stored in a SSIS Configuration table in the database.

我最近注意到oledb连接的服务器名称似乎保持静态。我已经看到了将软件包从一个环境移到另一个环境的位置,并且验证失败。如果我将密码更改为在第一个环境中使用的密码,它将进行验证。

I've noticed lately that the server name for my oledb connections seem to remain static. I have seen where I move the package from one environment to another and the validation fails. If I change the password to what is used in the first environment it validates.

除了我需要存储的连接字符串之外,还有其他属性吗?我没有使用变量或表达式。

Is there some other property besides the connection string that I need to store as well? I'm not using variables or expressions.

有人见过吗?有问题的服务器版本为2008 R2。

Has anyone seen this before? The server version in question is 2008 R2.

推荐答案

这可能是因为它试图使用存储在软件包中的连接字符串进行验证本身,而不是配置文件提供的内容。我知道有两种方法可以解决此问题:

This is likely because it's trying to validate using the connection string stored in the package itself and not the one provided by the configuration file. I know of two ways to get around this problem:


  1. 每个连接管理器和数据流任务都有一个名为DelayValidation的属性。设置为true时,该属性将阻止SSIS尝试验证连接和数据流任务,直到配置更改了连接字符串为止。麻烦的是,默认值为false,您必须在每个连接管理器和数据流任务上进行设置。您还需要记住,每次创建新设置时都要翻转设置。

  2. 您可以手动或以编程方式将SSIS包中连接字符串的实际值更改为在部署之前,请先与配置文件匹配。诚然,这似乎确实违背了拥有配置文件的目的,但它确实确保了该文件可以正常工作。这是我经常最终选择的选项。从测试环境转移到生产环境之前,我先在文本编辑器中打开包装,然后查找/替换连接字符串。我已经确定这样做对我的包裹来说是安全的,但是,像其他任何骇人听闻的解决方案一样,您的里程可能会有所不同。

这篇关于SSIS配置连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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