Where is my app.config for SSIS?
Posted
on SQLIS
See other posts from SQLIS
Published on Mon, 03 Aug 2009 09:20:00 +0100
Indexed on
2010/03/18
18:31 UTC
Read the original article
Hit count: 1114
execution
Sometimes when working with SSIS you need to add or change settings in the .NET application configuration file, which can be a bit confusing when you are building a SSIS package not an application. First of all lets review a couple of examples where you may need to do this.
- You are using referencing an assembly in a Script Task that uses Enterprise Library (aka EntLib), so you need to add the relevant configuration sections and settings, perhaps for the logging application block.
- You are using using Enterprise Library in a custom task or component, and again you need to add the relevant configuration sections and settings.
- You are using a web service with Microsoft Web Services Enhancements (WSE) 3.0 and hosting the proxy in SSIS, in an assembly used by your package, and need to add the configuration sections and settings.
- You need to change behaviours of the .NET framework which can be influenced by a configuration file, such as the System.Net.Mail default SMTP settings. Perhaps you wish to configure System.Net and the httpWebRequest header for parsing unsafe header (useUnsafeHeaderParsing), which will change the way the HTTP Connection manager behaves.
- You are consuming a WCF service and wish to specify the endpoint in configuration.
There are no doubt plenty more examples but each of these requires us to identify the correct configuration file and and make the relevant changes. There are actually several configuration files, each used by a different execution host depending on how you are working with the SSIS package.
The folders we need to look in will actually vary depending on the version of SQL Server as well as the processor architecture, but most are all what we can call the Binn folder. The SQL Server 2005 Binn folder is at C:\Program Files\Microsoft SQL Server\90\DTS\Binn\, compared to C:\Program Files\Microsoft SQL Server\100\DTS\Binn\ for SQL Server 2008. If you are on a 64-bit machine then you will see C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\ for the 32-bit executables and C:\Program Files\Microsoft SQL Server\90\DTS\Binn\ for 64-bit, so be sure to check all relevant locations. Of course SQL Server 2008 may have a C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\ on a 64-bit machine too.
To recap, the version of SQL Server determines if you look in the 90 or 100 sub-folder under SQL Server in Program Files (C:\Program Files\Microsoft SQL Server\nn\) . If you are running a 64-bit operating system then you will have two instances program files, C:\Program Files (x86)\ for 32-bit and C:\Program Files\ for 64-bit. You may wish to check both depending on what you are doing, but this is covered more under each section below.
There are a total of five specific configuration files that you may need to change, each one is detailed below:
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\90\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\90\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\90\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\90\Tools\Binn\VSShell\Common7\IDE\DTExecUI.exe
- C:\Program Files\Microsoft SQL Server\100\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.
In summary we have covered the assembly configuration files for all of the standard methods of building and running a SSIS package, but obviously if you are working programmatically you will need to make the relevant modifications to your program’s app.config as well.
© SQLIS or respective owner