Export (0) Print
Expand All

DTSProcessingTask Class

Processes objects in a Microsoft SQL Server Analysis Services database.

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

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=12.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", 
	IconResource = "ProcessTaskIcon")]
[GuidAttribute("095062DB-C4B1-4B43-97CD-53D236159E22")]
public sealed class DTSProcessingTask : ASTaskBase, 
	IDTSComponentPersist

The DTSProcessingTask type exposes the following members.

  NameDescription
Public methodDTSProcessingTaskInitializes a new instance of the DTSProcessingTask class.
Top

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

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

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>" +
    "</Batch>";

    Executable exe = pkg.Executables.Add("Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask, " +
      "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("ProcessingCommands").SetValue(thTask, procCmd);
    }

    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.

Community Additions

ADD
Show:
© 2014 Microsoft