Managing Running Packages Programmatically
As you work programmatically with Integration Services packages, you may want to determine which packages are currently running. The Application class of the Microsoft.SqlServer.Dts.Runtime namespace provides methods and classes to satisfy these requirements.
For more information about monitoring packages, see Managing Packages.
All the methods discussed in this topic require a reference to the Microsoft.SqlServer.ManagedDTS assembly. After you add the reference in a new project, import the Microsoft.SqlServer.Dts.Runtime namespace with a using or Imports statement.
The methods of the Application class for working with the SSIS Package Store support only ".", localhost, or the server name for the local server. You cannot use "(local)".
Administrators see all packages that are currently executing on the computer; other users see only those packages that they have launched.
After you have determined which packages are currently running, you can retrieve information about the packages and request that a package be stopped.
Getting Information about a Running Package
As you iterate through the RunningPackages collection, you can use the properties of the RunningPackage object to locate a package or to obtain additional information about the packages that are running: