DTSProcessingTask 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
处理 Microsoft SQL Server Analysis Services数据库中的对象。
public ref class DTSProcessingTask sealed : Microsoft::DataTransformationServices::Tasks::DTSProcessingTask::ASTaskBase, Microsoft::SqlServer::Dts::Runtime::IDTSComponentPersist
[Microsoft.SqlServer.Dts.Runtime.DtsTask(IconResource="ProcessTaskIcon", LocalizationType=typeof(Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask), TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("B8A6644B-E7A4-4409-8B78-59572781BD15")]
public sealed class DTSProcessingTask : Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASTaskBase, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist
[System.Runtime.InteropServices.Guid("B8A6644B-E7A4-4409-8B78-59572781BD15")]
[Microsoft.SqlServer.Dts.Runtime.DtsTask(IconResource="ProcessTaskIcon", LocalizationType=typeof(Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask), TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
public sealed class DTSProcessingTask : Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASTaskBase, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist
[System.Runtime.InteropServices.Guid("B8A6644B-E7A4-4409-8B78-59572781BD15")]
[Microsoft.SqlServer.Dts.Runtime.DtsTask(IconResource="ProcessTaskIcon", LocalizationType=typeof(Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask), TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
public sealed class DTSProcessingTask : Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.ASTaskBase, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(IconResource="ProcessTaskIcon", LocalizationType=typeof(Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask), TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("B8A6644B-E7A4-4409-8B78-59572781BD15")>]
type DTSProcessingTask = class
inherit ASTaskBase
interface IDTSComponentPersist
[<System.Runtime.InteropServices.Guid("B8A6644B-E7A4-4409-8B78-59572781BD15")>]
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(IconResource="ProcessTaskIcon", LocalizationType=typeof(Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask), TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
type DTSProcessingTask = class
inherit ASTaskBase
interface IDTSComponentPersist
[<System.Runtime.InteropServices.Guid("B8A6644B-E7A4-4409-8B78-59572781BD15")>]
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(IconResource="ProcessTaskIcon", LocalizationType=typeof(Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask), TaskType="DTS90", UITypeName="Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
type DTSProcessingTask = class
inherit ASTaskBase
interface IDTSComponentPersist
Public NotInheritable Class DTSProcessingTask
Inherits ASTaskBase
Implements IDTSComponentPersist
- 继承
- 属性
- 实现
示例
下面的代码示例在 Adventure Works DW 示例数据库中创建、配置和执行处理目标邮件挖掘模型的新 DTSProcessingTask 代码。
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();
}
}
}
Imports Microsoft.SqlServer.Dts.Runtime
Imports System.Reflection
Module Module1
Sub Main()
Dim pkg As New Package
Dim procCmd As String
Dim asCM As ConnectionManager
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>"
Dim exe As Executable = pkg.Executables.Add( _
"Microsoft.DataTransformationServices.Tasks.DTSProcessingTask.DTSProcessingTask, " & _
"Microsoft.SqlServer.ASTasks, Version=10.0.0.0, " & _
"Culture=neutral, PublicKeyToken=89845dcd8080cc91")
Dim thTask As TaskHost = CType(exe, TaskHost)
With thTask
.Properties("ConnectionName").SetValue(thTask, _
"Analysis Services Connection Manager")
.Properties("ProcessingCommands").SetValue(thTask, procCmd)
End With
Dim valResults As DTSExecResult = pkg.Validate( _
pkg.Connections, pkg.Variables, Nothing, Nothing)
If valResults = DTSExecResult.Success Then
pkg.Execute()
End If
End Sub
End Module
构造函数
DTSProcessingTask() |
初始化 DTSProcessingTask 类的新实例。 |
字段
bExecutionCanceled |
已取消执行。 (继承自 ASTaskBase) |
bTraceError |
跟踪错误。 (继承自 ASTaskBase) |
ddl |
数据定义语言。 (继承自 ASTaskBase) |
m_events |
事件。 (继承自 ASTaskBase) |
server |
服务器。 (继承自 ASTaskBase) |
属性
ConnectionName |
获取或设置 Analysis Services 任务的连接名称。 (继承自 ASTaskBase) |
ExecutionValue |
返回用户定义对象。 此字段为只读。 (继承自 Task) |
ProcessingCommands |
获取或设置要发送到 Analysis Services 服务器的处理命令的文本。 |
ProgressEventName |
获取 Analysis Services 任务的进度事件名称。 (继承自 ASTaskBase) |
StatusEventName |
获取 Analysis Services 任务的状态事件名称。 (继承自 ASTaskBase) |
SubComponentName |
获取 Analysis Services 任务的子组件名称。 (继承自 ASTaskBase) |
TargetServerVersion |
处理 Microsoft SQL Server Analysis Services数据库中的对象。 (继承自 Task) |
TaskDescription |
获取 Analysis Services 处理任务的说明。 |
TaskDisplayName |
获取 Analysis Services 处理任务的唯一名称。 |
Version |
*** 不推荐使用的成员;请参阅“备注”。 *** 返回任务的版本。 此属性为只读。 (继承自 Task) |