Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I work around the "The process cannot access the file .ISPAC because it is being used by another process" error?

I executed an SSIS package using SSDT and Visual Studio. When I try to execute another package I get an error saying "The process cannot access the file XXXX.ispac because it is being used by another process". I have tried rebooting but that is a pain in the behind. How can I work around this error?

like image 982
Tarzan Avatar asked Mar 07 '19 19:03

Tarzan


People also ask

How do I close the DtsDebugHost EXE process?

Go to Task Manager–> Details Tab. Locate the process “DtsDebugHost.exe“. Kill this process.

What is Ispac file in SSIS?

Whenever we build an SSIS project, the output of the build is an ISPAC file, also known as the Integration Services Package file. You can easily find this file by browsing the bin directory of the SSIS solution.

What is DtsDebugHost EXE?

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.


2 Answers

While developing an SSIS package I got the error “The process cannot access the file ‘.ispac’ because it is being used by another process”*.

Tried to close SSDT and run it again but, we still got the same error while compiling. Then, after searching over internet, we got the solution:

Solution :

  1. Go to Task Manager–> Details Tab.
  2. Locate the process “DtsDebugHost.exe“.
  3. Kill this process.

There might be multiple instances of this process. Kill all of them. After doing this, I tried to compile the package again and it was successful.

like image 88
Elijah David Avatar answered Oct 28 '22 02:10

Elijah David


You might check your patch level. I saw this much more frequently with the 2015 release of SSDT but hasn't bit me too often since then.

Finding and killing a process

Sysinternals has an excellent tool called Process Explorer. It's free, doesn't require an install and helps you see what all is happening on your computer. In this case, you want to find the process that has its grubby finger on your file (MyProject.ispac) and then kill it.

https://helpcenter.gsx.com/hc/en-us/articles/115015880627-How-to-Identify-which-Windows-Process-is-Locking-a-File-or-Folder

A different approach that doesn't require getting Process Explorer running is to change your build from Development to Release (and back again).

Chicken Sandwich No Pickles asks via comments

How can I convert from Development to Release?

In your tool bar, click where you see Development in the dropdown (or right click the solution in Solution Explorer)

enter image description here

In Configuration manager, you may/may not have a listing available under Configuration. Earlier versions of SSIS projects had dev/release configurations predefined but it looks like newer ones do not. If you do not have another option, make one via <New...>

enter image description here

Copy the values from the Development configuration et voilà!

enter image description here

Now when you debug, ProjectFolder/bin/Release will exist and the dtsdebughost.exe will latch onto that file and release the pointers to ProjectFolder/bin/Development/Project.ispac

like image 6
billinkc Avatar answered Oct 28 '22 01:10

billinkc