使用脚本任务的 SSIS 部署在 dtexec.exe.config 中找不到 app.config 设置

SSIS Deployment With Script Task Can't find app.config Settings in dtexec.exe.config

我有一个 SSIS 包,如果我将 app.config 设置放在 DtsDebugHost.exe.config 中,它在 Visual Studio 中运行良好。

当我在 dtexec.exe.config 中部署和包含设置时,它不起作用。这是一个涉及 WS2007Federation 的 WCF 应用程序,因此将所有这些都包含在代码中会很痛苦。网上关于这个的不多。我希望我没有处于最前沿。

实际的错误信息包括"This might be because the configuration file was not found"。我希望 dtexec.exe.config 是正确的地方。这不对吗?

您可能正在更改 32 位配置,而您应该更改 64 位配置,反之亦然。

根据this,您可能需要更改的具体配置文件共有五个,每个详细说明如下:

DTExec.exe.config

DTExec.exe is the standalone command line tool used for executing SSIS packages, and therefore it is an execution host with an app.config file.

e.g. C:\Program Files\Microsoft SQL Server\DTS\Binn\DTExec.exe.config

The file can be found in both the 32-bit and 64-bit Binn folders.

DtsDebugHost.exe.config

DtsDebugHost.exe is the execution host used by Business Intelligence Development Studio (BIDS) / Visual Studio when executing a package from the designer in debug mode, which is the default behaviour.

e.g. C:\Program Files\Microsoft SQL Server\DTS\Binn\DtsDebugHost.exe.config

The file can be found in both the 32-bit and 64-bit Binn folders. This may surprise some people as Visual Studio is only 32-bit, but thankfully the debugger supports both. This can be set in the project properties, see the Run64BitRuntime property (true or false) in the Debugging pane of the Project Properties.

dtshost.exe.config

dtshost.exe is the execution host used by what I think of as the built-in features of SQL Server such as SQL Server Agent

e.g. C:\Program Files\Microsoft SQL Server\DTS\Binn\dtshost.exe.config

This file can be found in both the 32-bit and 64-bit Binn folders

devenv.exe.config

Something slightly different is devenv.exe which is Visual Studio. This configuration file may also need changing if you need a feature at design-time such as in a Task Editor or Connection Manager editor.

Visual Studio 2005 for SQL Server 2005 - C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe.config Visual Studio 2008 for SQL Server 2008 - C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.config Visual Studio is only available for 32-bit so on a 64-bit machine you will have to look in C:\Program Files (x86)\ only.

DTExecUI.exe.config

The DTExec UI tool can also have a configuration file and these cab be found under the Tools folders for SQL Sever as shown below.

C:\Program Files\Microsoft SQL Server\Tools\Binn\VSShell\Common7\IDE\DTExecUI.exe C:\Program Files\Microsoft SQL Server0\Tools\Binn\VSShell\Common7\IDE\DTExecUI.exe

A configuration file may not exist, but if you can find the matching executable you know you are in the right place so can go ahead and add a new file yourself.

这在我重新启动服务器后起作用了。看起来,虽然可以动态地对 dtsdebughost.exe.config 进行更改,但对 dtexec.exe.config 的更改需要重新启动才能被 SSIS 程序包识别。

任务管理器来拯救。管理控制台上 SSISDB 节点的可执行文件是 ISServerExec.exe。我将 app.config 设置添加到 ISServerExec.exe.config,一切正常。因此,总而言之,我在 Visual Studio 上 运行 时成功地使用了 dtsdebughost.exe.config 并且在 运行 从管理控制台部署的包时成功地使用了 ISServerExec.exe.config。