Application.SaveToDtsServer(Package, IDTSEvents, String, String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
패키지를 파일 시스템에 저장합니다.
public:
void SaveToDtsServer(Microsoft::SqlServer::Dts::Runtime::Package ^ pPackage, Microsoft::SqlServer::Dts::Runtime::IDTSEvents ^ pEvents, System::String ^ sPackagePath, System::String ^ sServerName);
public void SaveToDtsServer(Microsoft.SqlServer.Dts.Runtime.Package pPackage, Microsoft.SqlServer.Dts.Runtime.IDTSEvents pEvents, string sPackagePath, string sServerName);
member this.SaveToDtsServer : Microsoft.SqlServer.Dts.Runtime.Package * Microsoft.SqlServer.Dts.Runtime.IDTSEvents * string * string -> unit
Public Sub SaveToDtsServer (pPackage As Package, pEvents As IDTSEvents, sPackagePath As String, sServerName As String)
매개 변수
- pPackage
- Package
구해야 할 패키지.
- pEvents
- IDTSEvents
IDTSEvents 개체입니다.
- sPackagePath
- String
저장 시 소포를 알려줄 이름. 이름 앞에 길을 붙일 수 있습니다. 예를 들어, myPackage라는 이름의 패키지를 파일 시스템 폴더에 저장하려면 매개변수 @"File System\myPackage"가 필요합니다.
- sServerName
- String
패키지를 저장할 서버 이름입니다.
예제
다음 코드 예시는 파일 시스템 폴더에 저장된 패키지를 myFolder2보여줍니다. 그 예시는 메서드를 호출 ExistsOnDtsServer 하여 패키지가 저장되었는지 확인합니다.
static void Main(string[] args)
{
// The variable pkg points to the location
// of the ExecuteProcess package sample
// that is installed with the SSIS samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
Application app = new Application();
Package p = app.LoadPackage(pkg, null);
// Save the package under myFolder which is found under the
// File System folder on the Integration Services service.
app.SaveToDtsServer(p, null, @"File System\myFolder2", "yourserver");
// Verify that the package was saved by calling ExistsOnDtsServer.
Boolean packageExists = app.ExistsOnDtsServer(@"File System\myFolder2", "yourserver");
Console.WriteLine("Package exists? " + packageExists);
}
Shared Sub Main(ByVal args() As String)
' The variable pkg points to the location
' of the ExecuteProcess package sample
' that is installed with the SSIS samples.
Dim pkg As String = "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"
Dim app As Application = New Application()
Dim p As Package = app.LoadPackage(pkg,Nothing)
' Save the package under myFolder which is found under the
' File System folder on the Integration Services service.
app.SaveToDtsServer(p, Nothing, "File System\myFolder2", "yourserver")
' Verify that the package was saved by calling ExistsOnDtsServer.
Dim packageExists As Boolean = app.ExistsOnDtsServer("File System\myFolder2","yourserver")
Console.WriteLine("Package exists? " + packageExists)
End Sub
샘플 출력:
Package exists? True