다음을 통해 공유


Application.GetDtsServerPackageInfos Method

Gets a PackageInfos collection that contains the packages stored in the SSIS Package Store on an instance of SQL Server, within the specified folder.

네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

구문

‘선언
Public Function GetDtsServerPackageInfos ( _
    sPackageFolder As String, _
    sServerName As String _
) As PackageInfos
public PackageInfos GetDtsServerPackageInfos (
    string sPackageFolder,
    string sServerName
)
public:
PackageInfos^ GetDtsServerPackageInfos (
    String^ sPackageFolder, 
    String^ sServerName
)
public PackageInfos GetDtsServerPackageInfos (
    String sPackageFolder, 
    String sServerName
)
public function GetDtsServerPackageInfos (
    sPackageFolder : String, 
    sServerName : String
) : PackageInfos

매개 변수

  • sPackageFolder
    The folder under Stored Packages that contains the packages you want to enumerate. If you want package information from the msdb database in SQL Server, you can also use the GetPackageInfos method. The folders in which packages are stored within the SSIS Package Store can be created from the Stored Packages node in Management Studio, by the dtutil.exe command prompt utility, or by the CreateFolderOnDtsServer method.
  • sServerName
    The name of the SQL Server instance where the packages reside. For the local server, use the server name or "."; "(local)" and "localhost" are not acceptable.

반환 값

A PackageInfos collection that contains PackageInfo objects.

주의

업데이트된 텍스트:2006년 7월 17일

This method connects to the SSIS Service to gather information about packages stored in the SSIS Package Store. It returns a PackageInfo object for each package stored in the specified logical folder. From the PackageInfo object, you can obtain the package's name, description, creation date, version, and additional information.

For more information, see Managing Packages and Folders Programmatically.

The following code example enumerates properties from the packages found in the PackageInfos collection, which is retrieved from the Application object.

static void Main(string[] args)
{
    Application app = new Application();

    PackageInfos pInfos = app.GetDtsServerPackageInfos(@"File System", "yourserver");
    foreach (PackageInfo pinfo in pInfos)
        Console.WriteLine(pinfo.Folder + " " + pinfo.Description);
}
Sub Main(ByVal args() As String)
    Dim app As Application =  New Application() 
 
    Dim pInfos As PackageInfos =  app.GetDtsServerPackageInfos("File System","yourserver") 
    For Each pinfo As PackageInfo In pInfos
        Console.WriteLine(pinfo.Folder + " " + pinfo.Description)
    Next
End Sub

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

Application Class
Application Members
Microsoft.SqlServer.Dts.Runtime Namespace