다음을 통해 공유


Managing Packages and Folders Programmatically

새 설치: 2006년 4월 14일

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.

In This Topic

  • Determining whether a package or folder exists
  • Managing packages and folders
    • Removing a package
    • Creating a folder
    • Removing a folder
    • Renaming a folder

For information about enumerating available packages, see Enumerating Available Packages Programmatically. For information about loading and running saved packages programmatically, see Loading and Running a Local Package Programmatically and Loading and Running a Remote Package Programmatically.

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.

ms403367.note(ko-kr,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 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

참고 항목

작업

Enumerating Available Packages Programmatically

관련 자료

Integration Services 패키지 관리

도움말 및 정보

SQL Server 2005 지원 받기