Поделиться через


Managing Running Packages Programmatically

Добавления: 17 июля 2006 г.

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 Управление пакетами служб Integration Services.

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.

Aa337075.note(ru-ru,SQL.90).gifВажно!
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)".

Determining Which Packages Are Currently Running

To determine which packages are currently running on the specified server, call the GetRunningPackages method. This method returns a RunningPackages collection of RunningPackage objects.

Aa337075.note(ru-ru,SQL.90).gifПримечание.
Administrators see all packages that are currently running on the computer; other users see only those packages that they have started.

Working with Running Packages

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:

Stopping a Running Package

You can call the Stop method of a RunningPackage object to request that the package be stopped. There may be a delay between the time that a stop request is issued and the time that the package actually stops.

См. также

Задачи

Enumerating Available Packages Programmatically

Другие ресурсы

Управление пакетами служб Integration Services

Справка и поддержка

Получение помощи по SQL Server 2005