SSIS 2012 SQL 代理作业 ConnectionString 与 InitialCatalog [英] SSIS 2012 SQL Agent Job ConnectionString vs InitialCatalog

查看:28
本文介绍了SSIS 2012 SQL 代理作业 ConnectionString 与 InitialCatalog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法从 SQL 代理和 SSIS 目录中找到讨论此问题的资源.

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

从 SQL 代理运行包时出现意外行为.我认为问题在于我在 sql 代理配置中指定的 InitialCatalog 属性与我在连接字符串环境变量中使用的属性不同.

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.

我原以为 ConnectionString 会覆盖 InitialCatalog,但似乎并非如此.

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

哪一个真正覆盖了另一个?这种行为可以改变吗?我似乎不能省略 InitialCatalog 值,但实际上可能吗?

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?

推荐答案

如果您修改连接管理器的属性窗口中的值,它将立即更新连接字符串.

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

SQL Server 代理没有连接字符串(它运行不同类型的作业/步骤).在这种情况下,它调用 DTSExec,后者依次执行 SSIS 包.

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.

如果您想动态覆盖连接管理器的 a 属性,那么您可能需要查看以下其他问题:

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

SSIS 如何动态设置连接字符串从配置文件

快速更改 SSIS 包数据源参数轻松迁移

这篇关于SSIS 2012 SQL 代理作业 ConnectionString 与 InitialCatalog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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