I recently came across this minor issue while attempting to get an SSIS package to run via the command prompt. It took me a couple of hours and quite honestly don’t recall how I stumbled upon the solution. Doing a search on “the Google” netted no results either since the error thrown was quite common. However, should you have the same error message as in the title above, perhaps try what I did below and hopefully my resolution can help you.

Problem: DTExec command line utility and Integration Services package execution utility throwing “Exception has been thrown by the target of an invocation” error.

Resolution: Move the input file location to a directory without a leading underscore in the folder name.

Additional Notes:

  • System Configuration: SQL Server 2012 RTM (11.0.2100.60) x64 running on Windows 2008 Enterprise R2 x64 with 4 vCPU and 32 GB vRAM.
  • Further testing was not done to determine if the underscore in any other part of the path would cause the same result.
  • Both the 32 bit and 64 bit dtexec.exe were shown to exhibit the problem.\
  • Integration Services Package Execution Utility also resulted in the same error.

Here is an example of the syntax originally which generated the failure. Notice the highlighted section, i.e. the underscore in the root folder of the path, _Installs. The output below has been shortened for brevity.

…and then the syntax after the input file was moved to a root folder without an underscore, result success:

SQL Server DTExec – Exception has been thrown by the target of an invocation
Tagged on: