| title | Managing Packages and Folders Programmatically | |||
|---|---|---|---|---|
| description | Managing Packages and Folders Programmatically | |||
| author | chugugrace | |||
| ms.author | chugu | |||
| ms.date | 03/14/2017 | |||
| ms.service | sql | |||
| ms.subservice | integration-services | |||
| ms.topic | reference | |||
| helpviewer_keywords |
|
[!INCLUDEsqlserver-ssis]
As you work programmatically with [!INCLUDEssISnoversion] packages, you may want to determine whether an individual package or folder exists, or to manage the folders in which packages are stored. The xref:Microsoft.SqlServer.Dts.Runtime.Application class of the xref:Microsoft.SqlServer.Dts.Runtime namespace provides a variety of methods to satisfy these requirements.
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 | xref:Microsoft.SqlServer.Dts.Runtime.Application.ExistsOnDtsServer%2A |
| [!INCLUDEssNoVersion] | xref:Microsoft.SqlServer.Dts.Runtime.Application.ExistsOnSqlServer%2A |
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 | xref:Microsoft.SqlServer.Dts.Runtime.Application.FolderExistsOnDtsServer%2A |
| [!INCLUDEssNoVersion] | xref:Microsoft.SqlServer.Dts.Runtime.Application.FolderExistsOnSqlServer%2A |
The xref:Microsoft.SqlServer.Dts.Runtime.Application class of the xref:Microsoft.SqlServer.Dts.Runtime namespace provides additional methods for managing packages and the folders in which they are stored.
To remove a saved package programmatically, call one of the following methods:
| Storage Location | Method to Call |
|---|---|
| SSIS Package Store | xref:Microsoft.SqlServer.Dts.Runtime.Application.RemoveFromDtsServer%2A |
| [!INCLUDEssNoVersion] | xref:Microsoft.SqlServer.Dts.Runtime.Application.RemoveFromSqlServer%2A |
To create a storage folder programmatically, call one of the following methods:
| Storage Location | Method to Call |
|---|---|
| SSIS Package Store | xref:Microsoft.SqlServer.Dts.Runtime.Application.CreateFolderOnDtsServer%2A |
| [!INCLUDEssNoVersion] | xref:Microsoft.SqlServer.Dts.Runtime.Application.CreateFolderOnSqlServer%2A |
To remove a storage folder programmatically, call one of the following methods:
| Storage Location | Method to Call |
|---|---|
| SSIS Package Store | xref:Microsoft.SqlServer.Dts.Runtime.Application.RemoveFolderFromDtsServer%2A |
| [!INCLUDEssNoVersion] | xref:Microsoft.SqlServer.Dts.Runtime.Application.RemoveFolderFromSqlServer%2A |
To rename a storage folder programmatically, call one of the following methods:
| Storage Location | Method to Call |
|---|---|
| SSIS Package Store | xref:Microsoft.SqlServer.Dts.Runtime.Application.RenameFolderOnDtsServer%2A |
| [!INCLUDEssNoVersion] | xref:Microsoft.SqlServer.Dts.Runtime.Application.RenameFolderOnSqlServer%2A |
Package Management (SSIS Service)
Enumerating Available Packages Programmatically