DTSProcessingTask Class


Processes objects in a Microsoft SQL Server Analysis Services database.

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


[DtsTaskAttribute(LocalizationType = typeof(DTSProcessingTask), 
	TaskType = "DTS90", UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
	IconResource = "ProcessTaskIcon")]
public sealed class DTSProcessingTask : ASTaskBase, IDTSComponentPersist


Initializes a new instance of the DTSProcessingTask class.


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.)


Returns a user-defined object. This field is read-only. (Inherited from Task.)


Gets or sets the text of the processing command to be sent to the Analysis Services server.


(Inherited from Task.)


Gets the description of the Analysis Services Processing task.


Gets the unique name for the Analysis Services Processing task.


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


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


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_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.)


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


(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_pubmethodLoadFromXML(XmlElement, IDTSInfoEvents)

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

System_CAPS_pubmethodSaveToXML(XmlDocument, IDTSInfoEvents)

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


(Inherited from Object.)


*** 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.)

The following code sample creates, configures, and executes a new DTSProcessingTask that processes the Targeted Mailing mining model in the Adventure Works DW sample database.

using Microsoft.SqlServer.Dts.Runtime;
using System.Reflection;

class Module1

  public static void Main()

    Package pkg = new Package();
    string procCmd;

    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;";

    procCmd = "<Batch xmlns=\"http://schemas.microsoft.com/analysisservices/2003/engine\">" +
      "<Parallel>" +
        "<Process xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
            "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +
          "<Object>" +
            "<DatabaseID>Adventure Works DW</DatabaseID>" +
            "<MiningStructureID>Targeted Mailing</MiningStructureID>" +
          "</Object>" +
          "<Type>ProcessFull</Type>" +
          "<WriteBackTableCreation>UseExisting</WriteBackTableCreation>" +
        "</Process>" +
      "</Parallel>" +

    Executable exe = pkg.Executables.Add("Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask, " +
      "Microsoft.SqlServer.ASTasks, Version=, " +
      "Culture=neutral, PublicKeyToken=89845dcd8080cc91");
    TaskHost thTask = (TaskHost) exe;
      thTask.Properties("ConnectionName").SetValue(thTask, "Analysis Services Connection Manager");
      thTask.Properties("ProcessingCommands").SetValue(thTask, procCmd);

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

    if (valResults==DTSExecResult.Success)



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