Export (0) Print
Expand All

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, 

The DTSProcessingTask type exposes the following members.

Public methodDTSProcessingTaskInitializes a new instance of the DTSProcessingTask class.

Public propertyConnectionNameInfrastructure. Gets or sets the name of the connection for the analysis services task. (Inherited from ASTaskBase.)
Public propertyExecutionValueReturns a user-defined object. This field is read-only. (Inherited from Task.)
Public propertyProcessingCommandsGets or sets the text of the processing command to be sent to the Analysis Services server.
Public propertyStatic memberTaskDescriptionGets the description of the Analysis Services Processing task.
Public propertyStatic memberTaskDisplayNameGets the unique name for the Analysis Services Processing task.
Public propertyVersion*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only. (Inherited from Task.)

Public methodCanUpdate*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML. (Inherited from Task.)
Public methodEqualsDetermines whether two object instances are equal. (Inherited from DtsObject.)
Public methodExecuteInfrastructure. Executes the analysis services task. (Inherited from ASTaskBase.)
Public methodGetConnectionIDGets a String containing the ID of the connection. (Inherited from Task.)
Public methodGetConnectionNameGets a String containing the name of the connection. (Inherited from Task.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from DtsObject.)
Public methodGetType (Inherited from Object.)
Public methodInitializeTaskInitializes the properties associated with the task. This method is called by the runtime and is not used in code. (Inherited from Task.)
Public methodLoadFromXMLLoads 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.
Public methodSaveToXMLSaves 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.
Public methodToString (Inherited from Object.)
Public methodUpdate*** 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.)
Public methodValidateInfrastructure. 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.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft