ASExecuteDDLTask 클래스

Executes Data Definition Language (DDL) commands against an instance of Microsoft SQL Server Analysis Services.

상속 계층

System.Object
  Microsoft.SqlServer.Dts.Runtime.DtsObject
    Microsoft.SqlServer.Dts.Runtime.Task
      Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASTaskBase
        Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASExecuteDDLTask

네임스페이스:  Microsoft.DataTransformationServices.Tasks.DTSProcessingTask
어셈블리:  Microsoft.SqlServer.ASTasks(Microsoft.SqlServer.ASTasks.dll)

구문

‘선언
<GuidAttribute("FCA58F9B-5937-4FCF-B851-8683F7B5A98F")> _
<DtsTaskAttribute(LocalizationType := GetType(ASExecuteDDLTask), UITypeName := "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.ASExecuteDDLTaskUI, Microsoft.SqlServer.ASTasksUI, Version=11.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91",  _
    IconResource := "ExecuteTaskIcon")> _
Public Class ASExecuteDDLTask _
    Inherits ASTaskBase _
    Implements IDTSComponentPersist
‘사용 방법
Dim instance As ASExecuteDDLTask
[GuidAttribute("FCA58F9B-5937-4FCF-B851-8683F7B5A98F")]
[DtsTaskAttribute(LocalizationType = typeof(ASExecuteDDLTask), UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.ASExecuteDDLTaskUI, Microsoft.SqlServer.ASTasksUI, Version=11.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
    IconResource = "ExecuteTaskIcon")]
public class ASExecuteDDLTask : ASTaskBase, 
    IDTSComponentPersist
[GuidAttribute(L"FCA58F9B-5937-4FCF-B851-8683F7B5A98F")]
[DtsTaskAttribute(LocalizationType = typeof(ASExecuteDDLTask), UITypeName = L"Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.ASExecuteDDLTaskUI, Microsoft.SqlServer.ASTasksUI, Version=11.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
    IconResource = L"ExecuteTaskIcon")]
public ref class ASExecuteDDLTask : public ASTaskBase, 
    IDTSComponentPersist
[<GuidAttribute("FCA58F9B-5937-4FCF-B851-8683F7B5A98F")>]
[<DtsTaskAttribute(LocalizationType = typeof(ASExecuteDDLTask), UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.ASExecuteDDLTaskUI, Microsoft.SqlServer.ASTasksUI, Version=11.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
    IconResource = "ExecuteTaskIcon")>]
type ASExecuteDDLTask =  
    class 
        inherit ASTaskBase 
        interface IDTSComponentPersist 
    end
public class ASExecuteDDLTask extends ASTaskBase implements IDTSComponentPersist

ASExecuteDDLTask 유형에서 다음 멤버를 표시합니다.

생성자

  이름 설명
공용 메서드 ASExecuteDDLTask Creates a new instance of the ASExecuteDDLTask class.

맨 위로 이동

속성

  이름 설명
공용 속성 ConnectionName 인프라입니다. Gets or sets the name of the connection for the analysis services task. (ASTaskBase에서 상속됨)
공용 속성 ExecutionValue Gets the result of the Analysis Services Execute DDL task. (Task.ExecutionValue을(를) 재정의함)
보호된 속성 ProgressEventName 인프라입니다. Gets the name of the progress event for the analysis services task. (ASTaskBase에서 상속됨)
공용 속성 Source Gets or sets the name of the source that contains the DDL statement to be sent to the Analysis Services server.
공용 속성 SourceType Gets or sets a value from the DDLSourceType enumeration indicating the source type that contains the DDL statements.
보호된 속성 StatusEventName 인프라입니다. Gets the status event name for the Analysis Services Execute DDL task. (ASTaskBase.StatusEventName을(를) 재정의함)
보호된 속성 SubComponentName 인프라입니다. Gets the sub component name for the Analysis Services Execute DDL task. (ASTaskBase.SubComponentName을(를) 재정의함)
공용 속성정적 멤버 TaskDescription Gets a description of the Analysis Services Execute DDL task.
공용 속성정적 멤버 TaskDisplayName Gets the unique name for the Analysis Services Execute DDL task.
공용 속성 Version *** Member deprecated; see Remarks. ***    Returns the version of the task. This property is read-only. (Task에서 상속됨)

맨 위로 이동

메서드

  이름 설명
공용 메서드 CanUpdate *** Member deprecated; see Remarks. ***    A Boolean that indicates whether the new package XML can update the old package XML. (Task에서 상속됨)
공용 메서드 Equals Determines whether two object instances are equal. (DtsObject에서 상속됨)
공용 메서드 Execute 인프라입니다. Executes the analysis services task. (ASTaskBase에서 상속됨)
보호된 메서드 Finalize (Object에서 상속됨)
보호된 메서드 FireError(String, String) 인프라입니다. Raises an event when an error occurs. (ASTaskBase에서 상속됨)
보호된 메서드 FireError(Int32, String, String, String) 인프라입니다. Raises an event when an error occurs. (ASTaskBase에서 상속됨)
공용 메서드 GetConnectionID Gets a String containing the ID of the connection. (Task에서 상속됨)
공용 메서드 GetConnectionName Gets a String containing the name of the connection. (Task에서 상속됨)
공용 메서드 GetHashCode Returns the hash code for this instance. (DtsObject에서 상속됨)
공용 메서드 GetType (Object에서 상속됨)
공용 메서드 InitializeTask Initializes the properties associated with the task. This method is called by the runtime and is not used in code. (Task에서 상속됨)
보호된 메서드 InternalExecute 인프라입니다. Executes the DDL task internally. (ASTaskBase.InternalExecute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)을(를) 재정의함)
보호된 메서드 InternalValidate 인프라입니다. Validates the DDL task internally. (ASTaskBase.InternalValidate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)을(를) 재정의함)
공용 메서드 LoadFromXML This method is not callable by your application code. To load a package saved as .xml, use the Application.LoadPackage method.
보호된 메서드 MemberwiseClone (Object에서 상속됨)
공용 메서드 SaveToXML This method is not callable by your application code. To save a package as .xml, use the Application.SaveToXml method.
보호된 메서드 StopExecution 인프라입니다. Stops the execution of the analysis service task. (ASTaskBase에서 상속됨)
보호된 메서드 SubscribeToProgressEvent 인프라입니다. Subscribes the task to progress event. (ASTaskBase에서 상속됨)
공용 메서드 ToString (Object에서 상속됨)
보호된 메서드 UnsubscribeToProgressEvent 인프라입니다. Unsubscribes the task from the progress event. (ASTaskBase에서 상속됨)
공용 메서드 Update *** Member deprecated; see Remarks. ***    This method updates the old package XML with the new package XML if CanUpdate is set to true. (Task에서 상속됨)
공용 메서드 Validate 인프라입니다. Validates the analysis service task. (ASTaskBase에서 상속됨)
보호된 메서드 ValidateConnection 인프라입니다. Validates the task connection. (ASTaskBase에서 상속됨)
보호된 메서드 ValidateDDL 인프라입니다. Verifies that the DDL task is properly configured. (ASTaskBase.ValidateDDL(VariableDispenser, Connections, Exception%)을(를) 재정의함)
보호된 메서드 WriteLog 인프라입니다. Writes a log for the task. (ASTaskBase에서 상속됨)

맨 위로 이동

필드

  이름 설명
보호된 필드 bExecutionCanceled 인프라입니다. The execution is cancelled. (ASTaskBase에서 상속됨)
보호된 필드 bTraceError 인프라입니다. The trace error. (ASTaskBase에서 상속됨)
보호된 필드 ddl 인프라입니다. The data definition language. (ASTaskBase에서 상속됨)
보호된 필드 m_events 인프라입니다. The events. (ASTaskBase에서 상속됨)
보호된 필드 server 인프라입니다. The server. (ASTaskBase에서 상속됨)

맨 위로 이동

The following code sample creates, configures, and executes a new ASExecuteDDLTask that loads the DDL statement to execute from a file connection.

using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.DataTransformationServices.Tasks.DTSProcessingTask;

class Module1
{

  public static void Main()
  {

    Package pkg = new Package();

    ConnectionManager asCM;
    asCM = pkg.Connections.Add("MSOLAP100");
    asCM.Name = "Analysis Services Connection Manager";
    asCM.ConnectionString = "Data Source=<servername>;" +
      "Initial Catalog=Adventure Works DW;Provider=MSOLAP;" +
      "Integrated Security=SSPI;Impersonation Level=Impersonate;";

    ConnectionManager cmdCM;
    cmdCM = pkg.Connections.Add("FILE");
    cmdCM.Name = "Command Source Connection Manager";
    cmdCM.ConnectionString = "C:\\ddltest.txt";

    Executable exe = pkg.Executables.Add("Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASExecuteDDLTask, " +
      "Microsoft.SqlServer.ASTasks, Version=10.0.0.0, " +
      "Culture=neutral, PublicKeyToken=89845dcd8080cc91");
    TaskHost thTask = (TaskHost) exe;
    {
      thTask.Properties("ConnectionName").SetValue(thTask, "Analysis Services Connection Manager");
      thTask.Properties("SourceType").SetValue(thTask, DDLSourceType.FileConnection);
      thTask.Properties("Source").SetValue(thTask, "Command Source Connection Manager");
    }

    DTSExecResult valResults = pkg.Validate(pkg.Connections, pkg.Variables, null, null);

    if (valResults==DTSExecResult.Success)
    {
      pkg.Execute();
    }

  }

}
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.DataTransformationServices.Tasks.DTSProcessingTask

Module Module1

  Sub Main()

    Dim pkg As New Package

    Dim asCM As ConnectionManager
    asCM = pkg.Connections.Add("MSOLAP100")
    asCM.Name = "Analysis Services Connection Manager"
    asCM.ConnectionString = "Data Source=<servername>;" & _
      "Initial Catalog=Adventure Works DW;Provider=MSOLAP;" & _
      "Integrated Security=SSPI;Impersonation Level=Impersonate;"

    Dim cmdCM As ConnectionManager
    cmdCM = pkg.Connections.Add("FILE")
    cmdCM.Name = "Command Source Connection Manager"
    cmdCM.ConnectionString = "C:\ddltest.txt"

    Dim exe As Executable = pkg.Executables.Add( _
      "Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASExecuteDDLTask, " & _
      "Microsoft.SqlServer.ASTasks, Version=10.0.0.0, " & _
      "Culture=neutral, PublicKeyToken=89845dcd8080cc91")
    Dim thTask As TaskHost = CType(exe, TaskHost)
    With thTask
      .Properties("ConnectionName").SetValue(thTask, _
        "Analysis Services Connection Manager")
      .Properties("SourceType").SetValue(thTask, DDLSourceType.FileConnection)
      .Properties("Source").SetValue(thTask, "Command Source Connection Manager")
    End With

    Dim valResults As DTSExecResult = pkg.Validate( _
      pkg.Connections, pkg.Variables, Nothing, Nothing)

    If valResults = DTSExecResult.Success Then
      pkg.Execute()
    End If

  End Sub

End Module

스레드 보안

이 유형의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

참고 항목

참조

Microsoft.DataTransformationServices.Tasks.DTSProcessingTask 네임스페이스