Export (0) Print
Expand All

ASExecuteDDLTask Class

 

Applies To: SQL Server 2016 Preview

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

Namespace:   Microsoft.DataTransformationServices.Tasks.DTSProcessingTask
Assembly:  Microsoft.SqlServer.ASTasks (in Microsoft.SqlServer.ASTasks.dll)


[GuidAttribute("7D47B41E-12A8-4957-9F7C-D39CBB0D2491")]
[DtsTaskAttribute(LocalizationType = typeof(ASExecuteDDLTask), 
	UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.ASExecuteDDLTaskUI, Microsoft.SqlServer.ASTasksUI, Version=12.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
	IconResource = "ExecuteTaskIcon")]
public class ASExecuteDDLTask : ASTaskBase, IDTSComponentPersist

NameDescription
System_CAPS_pubmethodASExecuteDDLTask()

Creates a new instance of the ASExecuteDDLTask class.

NameDescription
System_CAPS_pubpropertyConnectionName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the name of the connection for the analysis services task.(Inherited from ASTaskBase.)

System_CAPS_pubpropertyExecutionValue

Gets the result of the Analysis Services Execute DDL task.(Overrides Task.ExecutionValue.)

System_CAPS_protpropertyProgressEventName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the name of the progress event for the analysis services task.(Inherited from ASTaskBase.)

System_CAPS_pubpropertySource

Gets or sets the name of the source that contains the DDL statement to be sent to the Analysis Services server.

System_CAPS_pubpropertySourceType

Gets or sets a value from the DDLSourceType enumeration indicating the source type that contains the DDL statements.

System_CAPS_protpropertyStatusEventName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the status event name for the Analysis Services Execute DDL task.(Overrides ASTaskBase.StatusEventName.)

System_CAPS_protpropertySubComponentName

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the sub component name for the Analysis Services Execute DDL task.(Overrides ASTaskBase.SubComponentName.)

System_CAPS_pubpropertySystem_CAPS_staticTaskDescription

Gets a description of the Analysis Services Execute DDL task.

System_CAPS_pubpropertySystem_CAPS_staticTaskDisplayName

Gets the unique name for the Analysis Services Execute DDL task.

System_CAPS_pubpropertyVersion

*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.(Inherited from Task.)

NameDescription
System_CAPS_pubmethodCanUpdate(String)

*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML.(Inherited from Task.)

System_CAPS_pubmethodEquals(Object)

Determines whether two object instances are equal.(Inherited from DtsObject.)

System_CAPS_pubmethodExecute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

This API supports the product infrastructure and is not intended to be used directly from your code. Executes the analysis services task.(Inherited from ASTaskBase.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_protmethodFireError(Int32, String, String, String)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises an event when an error occurs.(Inherited from ASTaskBase.)

System_CAPS_protmethodFireError(String, String)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises an event when an error occurs.(Inherited from ASTaskBase.)

System_CAPS_pubmethodGetConnectionID(Connections, String)

Gets a String containing the ID of the connection.(Inherited from Task.)

System_CAPS_pubmethodGetConnectionName(Connections, String)

Gets a String containing the name of the connection.(Inherited from Task.)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this instance.(Inherited from DtsObject.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

Initializes the properties associated with the task. This method is called by the runtime and is not used in code.(Inherited from Task.)

System_CAPS_protmethodInternalExecute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

This API supports the product infrastructure and is not intended to be used directly from your code. Executes the DDL task internally.(Overrides ASTaskBase.InternalExecute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object).)

System_CAPS_protmethodInternalValidate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

This API supports the product infrastructure and is not intended to be used directly from your code. Validates the DDL task internally.(Overrides ASTaskBase.InternalValidate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging).)

System_CAPS_pubmethodLoadFromXML(XmlElement, IDTSInfoEvents)

This method is not callable by your application code. To load a package saved as .xml, use the Application.LoadPackage method.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSaveToXML(XmlDocument, IDTSInfoEvents)

This method is not callable by your application code. To save a package as .xml, use the Application.SaveToXml method.

System_CAPS_protmethodStopExecution()

This API supports the product infrastructure and is not intended to be used directly from your code. Stops the execution of the analysis service task.(Inherited from ASTaskBase.)

System_CAPS_protmethodSubscribeToProgressEvent(SessionTrace)

This API supports the product infrastructure and is not intended to be used directly from your code. Subscribes the task to progress event.(Inherited from ASTaskBase.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_protmethodUnsubscribeToProgressEvent(SessionTrace)

This API supports the product infrastructure and is not intended to be used directly from your code. Unsubscribes the task from the progress event.(Inherited from ASTaskBase.)

System_CAPS_pubmethodUpdate(String)

*** Member deprecated; see Remarks. ***   This method updates the old package XML with the new package XML if CanUpdate is set to true.(Inherited from Task.)

System_CAPS_pubmethodValidate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

This API supports the product infrastructure and is not intended to be used directly from your code. Validates the analysis service task.(Inherited from ASTaskBase.)

System_CAPS_protmethodValidateConnection(Connections)

This API supports the product infrastructure and is not intended to be used directly from your code. Validates the task connection.(Inherited from ASTaskBase.)

System_CAPS_protmethodValidateDDL(VariableDispenser, Connections, Exception)

This API supports the product infrastructure and is not intended to be used directly from your code. Verifies that the DDL task is properly configured.(Overrides ASTaskBase.ValidateDDL(VariableDispenser, Connections, Exception).)

System_CAPS_protmethodWriteLog(IDTSLogging, String)

This API supports the product infrastructure and is not intended to be used directly from your code. Writes a log for the task.(Inherited from ASTaskBase.)

NameDescription
System_CAPS_protfieldbExecutionCanceled

This API supports the product infrastructure and is not intended to be used directly from your code. The execution is cancelled.(Inherited from ASTaskBase.)

System_CAPS_protfieldbTraceError

This API supports the product infrastructure and is not intended to be used directly from your code. The trace error.(Inherited from ASTaskBase.)

System_CAPS_protfieldddl

This API supports the product infrastructure and is not intended to be used directly from your code. The data definition language.(Inherited from ASTaskBase.)

System_CAPS_protfieldm_events

This API supports the product infrastructure and is not intended to be used directly from your code. The events.(Inherited from ASTaskBase.)

System_CAPS_protfieldserver

This API supports the product infrastructure and is not intended to be used directly from your code. The server.(Inherited from ASTaskBase.)

Legacy Code Example

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();
    }

  }

}

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

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft