SSIS 部署/设置问题
我有一个 SSIS 2008 包,它导入一些数据,然后将文本文件写入计算机上的本地文件夹。一切都构建、部署和安装得很好,并且在我的 XML 配置文件中,我有一个属性来设置本地文件夹的位置。我还使用操作系统环境变量在运行时重定向 XML 配置文件的位置。在我的开发计算机上,我将投放文件夹位置设置为 C:\Temp,但在目标计算机上,我希望将此投放文件夹设置为 E:\SSIS\FileDropOff,并且我在安装时更改该配置设置。一切设置对我来说看起来都很好,配置文件看起来没问题,安装时的验证检查中没有警告或错误,环境变量指向正确的位置,并且 SSIS 包安装在 SQL Server MSDB 数据库中。
问题是当 SSIS 包在目标计算机上运行时,它会不断将文本文件写入 C:\Temp。无论我做什么,我似乎都无法将其写入 E:\SSIS\FileDropOff 文件夹。这就像 SSIS 包卡在 C:\Temp 上并忽略目标计算机上的 XML 配置文件设置。在运行 SSIS 包的 SQL 代理中,我什至尝试选中“作业步骤属性”屏幕、“数据源”选项卡上的复选框并将连接字符串设置为 E:\SSIS\FileDropOff,但它仍然不起作用。
SSIS 包查看 C:\Temp 时是否有任何地方我可能会遗漏?是否有一个我不知道的缓存值会强制包粘贴在 C:\Temp 上?
谢谢。
I have an SSIS 2008 Package that imports some data and then writes out a text file to a local folder on the computer. Everything built, deployed and installed fine, and in my XML configuration file I have a property to set the location of the local folder. I also use an operating system Environment Variable to redirect the location of the XML Configuration file at run time. On my development machine I set the drop-off folder location to C:\Temp, but on the target computer I want this drop-off folder set to E:\SSIS\FileDropOff and I make that configuration setting change at install time. The setup for everything looks fine to me, configuration file looks ok, there were no warnings or errors in the validation check at install time, the Environment Variable is pointing to the right place, and the SSIS Package is installed in the SQL Server MSDB database.
The problem is when the SSIS Package runs on the target computer, it keeps writing the text file to C:\Temp. No matter what I do I can't seem to get it to write to the E:\SSIS\FileDropOff folder. It's like the SSIS Package is stuck on C:\Temp and is ignoring the the XML configuration file setting on the target machine. In the SQL Agent running the SSIS Package I even tried checking the box on the Job Step Properties screen, Data Sources tab and set the Connection String to E:\SSIS\FileDropOff and it still doesn't work.
Is there any place I could be missing where the SSIS Package is looking at C:\Temp? Could there be a cached value someplace that I am not aware of that forcing the package to stick on C:\Temp?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
1.) 尝试重新启动 SQL 代理服务。如果我没记错的话,它会缓存环境变量。
2.) 尝试设置一个包变量并使用它来设置连接字符串而不是直接设置 xml 文件。
1.) Try restarting your SQL Agent Service. If I remember correctly, it caches environment variables.
2.) Try setting up a package variable and using that to set the connection string instead of the xml file directly.
我相信在环境(即开发 - 测试 - 产品)之间移动时忘记在新环境中右键单击包并选择最新的 XML 配置文件是一个常见的错误。因此,您的包仍在查看旧的 XML 配置文件。您需要右键单击,然后选择浏览并打开适用于特定环境的浏览器。
有道理吗?
如果您没有这样做,您可能会无意中覆盖您的配置文件。
I believe it's a common mistake when moving between environments (i.e., dev - test - prod) to forget to right click on your package in the new environment and select the latest XML config file. So what's happening is your package is still looking at the old XML config file. You need to right click, and choose to browse and open the one intended for the specific environment.
Make sense?
If you didn't do this you may have unintentionally overwritten your config file.