SSIS 2012 SQL Agent Job ConnectionString vs InitialCatalog

岁酱吖の 提交于 2019-12-22 08:37:13

问题


I was not able to find a resource discussing this from the SQL Agent and SSIS Catalog.

I'm getting behavior that was unexpected when running a package from SQL Agent. I believe that the issue is that I specified a different InitialCatalog property in the sql agent configuration than I used in my connection string environment variable.

Here you can see my connection string is different.

I was expecting that the ConnectionString would override the InitialCatalog, but it does not seem to be the case.

Which one really overrides the other? Can that behavior be altered? It does not appear that I can omit an InitialCatalog value, but is it actually possible?


回答1:


If you modify a value in the properties windows for a connection manager, it will update the connection string immediately.

The SQL Server Agent has no connection strings (it runs different types of jobs/steps). In this case, it calls DTSExec, which in turn executes the SSIS package.

If you want to override the a property for a connection manager dynamically, then you may want to look at these other questions:

SSIS how to set connection string dynamically from a config file

Quickly changing SSIS-packages data source parameters for easy migration



来源:https://stackoverflow.com/questions/29125854/ssis-2012-sql-agent-job-connectionstring-vs-initialcatalog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!