Managing Packages and Folders Programmatically

As you work programmatically with Integration Services packages, you may want to determine whether an individual package or folder exists, or to manage the folders in which packages are stored. The Application class of the Microsoft.SqlServer.Dts.Runtime namespace provides a variety of methods to satisfy these requirements.

Determining Whether a Package or Folder Exists

To determine programmatically whether a saved package exists, call one of the following methods before attempting to load and run the package:

Storage Location Method to Call
SSIS Package Store ExistsOnDtsServer
SQL Server ExistsOnSqlServer

To determine programmatically whether a folder exists, call one of the following methods before attempting to list the packages stored in the folder, :

Storage Location Method to Call
SSIS Package Store FolderExistsOnDtsServer
SQL Server FolderExistsOnSqlServer

Back to top

Managing Packages and Folders

The Application class of the Microsoft.SqlServer.Dts.Runtime namespace provides additional methods for managing packages and the folders in which they are stored.

Removing a Package

To remove a saved package programmatically, call one of the following methods:

Storage Location Method to Call
SSIS Package Store RemoveFromDtsServer
SQL Server RemoveFromSqlServer

Back to top

Creating a Folder

To create a storage folder programmatically, call one of the following methods:

Storage Location Method to Call
SSIS Package Store CreateFolderOnDtsServer
SQL Server CreateFolderOnSqlServer

Back to top

Removing a Folder

To remove a storage folder programmatically, call one of the following methods:

Storage Location Method to Call
SSIS Package Store RemoveFolderFromDtsServer
SQL Server RemoveFolderFromSqlServer

Back to top

Renaming a Folder

To rename a storage folder programmatically, call one of the following methods:

Storage Location Method to Call
SSIS Package Store RenameFolderOnDtsServer
SQL Server RenameFolderOnSqlServer

Back to top

See Also

Package Management (SSIS Service)
Enumerating Available Packages Programmatically