Sometimes it happens. SQL Server Data Tools crashes and burns. (It’s also known as Visual Studio or SSDT but I don’t know how to pronounce that…) Was it something I said? I’m currently building a small data warehouse and building out a lot of packages in a fairly short period of time, so maybe I was wearing out good ole’ SSDT. After setting up a new package, I tried to execute it and the application hung. I waited patiently. Nothing. Waited some more, and then decided I had no choice. I had to put SSDT out of its misery and (hide the children) kill the process. Now this was something that I encountered often enough when working with earlier versions of SQL Server using Business Intelligence Development Studio (or the more pronounceable BIDS), but SSDT has been much more stable for me. Until this moment.
After reopening SSDT, I tried to run my package, but got this error:
Failed to execute package or element. Build errors were encountered. For more information, see the Output window.
I’m good at following directions. This is what I found in the Output window:
------ Build started: Project: DW_ETL, Configuration: Development ------
Build started: SQL Server Integration Services project: Incremental ...
Starting project consistency check ...
Project consistency check completed. The project is consistent.
Error : System.IO.IOException: The process cannot access the file
'C:\Users\<snip>\<solution>\<project>\bin\Development\DW_ETL.ispac'
because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Delete(String path)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.
IncrementalBuildThroughObj(IOutputWindow outputWindow)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.
BuildIncremental(IOutputWindow outputWindow)
Build complete -- 1 errors, 0 warnings
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
And for good measure, I also looked in the Error window which contained essentially the same message.
The ISPAC file is necessary for deploying a project to the SSISDB catalog. It gets built automatically when you execute a package in SSDT, or you can manually build it by using the Build command in SSDT. Its purpose is to consolidate all the packages and parameters for your project (assuming you are using the default Project Deployment mode), so that you can deploy the entire project to the SSISDB database as a single unit. In other words, you can hand off one file to an administrator of the Integration Services server and they can deploy it onto the server.
During the development process, I don’t need the ISPAC file. And if it’s being used by another process, ostensibly the one I just killed, but blocking my current process, I should just kill it, too. The problem I found is that it was good at self-defense. When I tried to delete the ISPAC file, I got the following message:
Action can’t be completed because the file is open in SSIS debug host.
Okay, fine, I closed SSDT and tried to delete the ISPAC file again. Same message.
Next I went to Task Manager and found two processes. DTSDebugHost.exe and DTSDebugHost.exe *32. Can you guess what I did? I had to be pretty ruthless yesterday. I don’t feel good about it, but it had to be done. After the deed was done, I never looked back. I reopened SSDT and ran my package successfully. All’s well that ends well.
26 Comments
Thanks, i also had 2 dts debug hosts running, killed them both, worked like a charm
Thanks, Stacia. I hit this error for the first time today. I was using Biml so I thought it might have been related to that. It sounds like just a bug in VS.
Happy to help, Tim!
Wow… you had the solution in the last line…. You made me read all your post. But your solution worked.
Thanks.
Thanks! That was extremely helpful as well as humorous.
That worked great. Thanks!
Thanks, that worked for me also…..
Thanks worked for me also..:)
Hi,Awesome
OMG!!!
You are life saver,I was blaming TFS for this issue 🙂
Thanks…. This helped me too 🙂
Your solution worked like a charm. Thank you.
I didn’t have those 2 task running but was getting same error message. I ended up deleting the ISPAC file and that freed up the system. Thanks for this article as it is the only one on the whole world wide web out of 7+ billion people that speaks to this issue. I guess Microsoft pushes it under the rug.
Thank you!! This works for me!
Thanks worked for me also… thanks you sooooomuch
Thanks, i also had 2 dts debug hosts running, killed them both, Now it’s workoing.
Thank you for sharing. I enjoyed your writing, too!
Thanks , i killed both dts debug host and it’s working
Thanks for the Post.. Just did as you suggested.
Thanks, worked as suggested.
super..it’s worked for me thank you so much
Thanx! this is very good to know. In my case it looks like SSDT crashed in the end of debugging and restarted its self. Your solution helped me much!
Ondra
Thanks for the tip – I have a love/hate relationship with SSDT 😉
Thanks! Very helpful.
Very helpful !! was struggling for a long 🙂
Thanks for the article.