Export (0) Print
Expand All

DTSProcessingTask Class

Processes objects in a SQL Server 2005 Analysis Services (SSAS) 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=9.00.242.00, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", IconResource="ProcessTaskIcon")] 
[GuidAttribute("BA9F04BE-A93C-4c41-9E74-B8B9DB2D320B")] 
public sealed class DTSProcessingTask : ASTaskBase, IDTSComponentPersist
/** @attribute DtsTaskAttribute(LocalizationType=Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask, TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=9.00.242.00, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", IconResource="ProcessTaskIcon") */ 
/** @attribute GuidAttribute("BA9F04BE-A93C-4c41-9E74-B8B9DB2D320B") */ 
public final class DTSProcessingTask extends ASTaskBase implements IDTSComponentPersist
DtsTaskAttribute(LocalizationType=Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask, TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=9.00.242.00, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", IconResource="ProcessTaskIcon") 
GuidAttribute("BA9F04BE-A93C-4c41-9E74-B8B9DB2D320B") 
public final class DTSProcessingTask extends ASTaskBase implements IDTSComponentPersist

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

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("MSOLAP90");
    asCM.Name = "Analysis Services Connection Manager";
    asCM.ConnectionString = "Data Source=<servername>;" +
      "Initial Catalog=Adventure Works DW;Provider=MSOLAP.3;" +
      "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=9.0.242.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 Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft