Guilherme Matheus
Guilherme Matheus

Reputation: 595

SSIS finish all tasks in package but cant quit the package (still running)

I have two packages on SSIS that I run a .BAT file to export a CSV file and then import to a SQL Server table (unfortunately the names are all in Portuguese). All packages are successfully executed, but when I close the window, it gives me an error message that I need to press the "stop" button and then it lets me close the window.

I'm forgetting something?Because I'm afraid to schedule this package to run and it never ends.

Package:

enter image description here

Upvotes: 0

Views: 1419

Answers (1)

Dipen Parekh
Dipen Parekh

Reputation: 86

I am unable to write a comment, so not able to ask you a few questions before answering. Hence, here is what I think will help you with some assumptions of what you are doing.

I am assuming from your screenshot that you are running the packages from Visual Studio using the Start button at the top (or by pressing F5 or some process is starting the Visual Studio and running the package). When you click on Start, you are executing the package in Debug mode and in that case it is a standard behaviour of Visual Studio that requires you to manually stop the debugging.

enter image description here

If you want to ensure that package has completed (successfully or with errors) then you can check the Progress tab on top. You should be able to see the "Finished" message with time under the main package level. enter image description here

If you do not want to run the package in Debug mode then you can go to Debug tab and click "Start without Debugging" or press Ctrl+F5 on your keyboard.

As for scheduling the package, you can do it through different mechanisms. Most common is through SQL Agent and that will not require you to stop the package manually. Schedule using SQL Agent

You can also do it with Windows Scheduler using dtexec. Schedule using Windows Scheduler

I you are clicking on some .exe or .bat file that start Visual Studio and runs this package then I assume it is provided by someone, in that case it is better you ask that person to help you in scheduling the package itself. Scheduling the .exe or .bat will cause Visual Studio instances being created.

Upvotes: 3

Related Questions