DTSProcessingTask-Klasse
Processes objects in a Microsoft SQL Server Analysis Services database.
Vererbungshierarchie
System. . :: . .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)
Syntax
'Declaration
<DtsTaskAttribute(LocalizationType := GetType(DTSProcessingTask), TaskType := "DTS90", _
UITypeName := "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=10.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91", _
IconResource := "ProcessTaskIcon")> _
<GuidAttribute("BB85884C-3512-450f-9DB6-1AEDE8284283")> _
Public NotInheritable Class DTSProcessingTask _
Inherits ASTaskBase _
Implements IDTSComponentPersist
'Usage
Dim instance As DTSProcessingTask
[DtsTaskAttribute(LocalizationType = typeof(DTSProcessingTask), TaskType = "DTS90",
UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=10.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91",
IconResource = "ProcessTaskIcon")]
[GuidAttribute("BB85884C-3512-450f-9DB6-1AEDE8284283")]
public sealed class DTSProcessingTask : ASTaskBase,
IDTSComponentPersist
[DtsTaskAttribute(LocalizationType = typeof(DTSProcessingTask), TaskType = L"DTS90",
UITypeName = L"Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=10.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91",
IconResource = L"ProcessTaskIcon")]
[GuidAttribute(L"BB85884C-3512-450f-9DB6-1AEDE8284283")]
public ref class DTSProcessingTask sealed : public ASTaskBase,
IDTSComponentPersist
[<SealedAttribute>]
[<DtsTaskAttribute(LocalizationType = typeof(DTSProcessingTask), TaskType = "DTS90",
UITypeName = "Microsoft.DataTransformationServices.Tasks.DTSProcessingTaskUI.DTSProcessingTaskUI, Microsoft.SqlServer.ASTasksUI, Version=10.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91",
IconResource = "ProcessTaskIcon")>]
[<GuidAttribute("BB85884C-3512-450f-9DB6-1AEDE8284283")>]
type DTSProcessingTask =
class
inherit ASTaskBase
interface IDTSComponentPersist
end
public final class DTSProcessingTask extends ASTaskBase implements IDTSComponentPersist
Der DTSProcessingTask-Typ macht folgende Elemente verfügbar.
Konstruktoren
Name | Beschreibung | |
---|---|---|
DTSProcessingTask | Initializes a new instance of the DTSProcessingTask class. |
Zum Anfang
Eigenschaften
Name | Beschreibung | |
---|---|---|
ConnectionName | Infrastruktur (Geerbt von ASTaskBase.) | |
ExecutionValue | Returns a user-defined object. This field is read-only. (Geerbt von Task.) | |
ProcessingCommands | Gets or sets the text of the processing command to be sent to the Analysis Services server. | |
ProgressEventName | Infrastruktur (Geerbt von ASTaskBase.) | |
StatusEventName | Infrastruktur (Geerbt von ASTaskBase.) | |
SubComponentName | Infrastruktur (Geerbt von ASTaskBase.) | |
TaskDescription | Gets the description of the Analysis Services Processing task. | |
TaskDisplayName | Gets the unique name for the Analysis Services Processing task. | |
Version | *** Member deprecated; see Remarks. *** Returns the version of the task. This property is read-only. (Geerbt von Task.) |
Zum Anfang
Methoden
Name | Beschreibung | |
---|---|---|
CanUpdate | *** Member deprecated; see Remarks. *** A Boolean that indicates whether the new package XML can update the old package XML. (Geerbt von Task.) | |
Equals | Determines whether two object instances are equal. (Geerbt von DtsObject.) | |
Execute | Infrastruktur (Geerbt von ASTaskBase.) | |
Finalize | (Geerbt von Object.) | |
FireError(String, String) | Infrastruktur (Geerbt von ASTaskBase.) | |
FireError(Int32, String, String, String) | Infrastruktur (Geerbt von ASTaskBase.) | |
GetConnectionID | Gets a String containing the ID of the connection. (Geerbt von Task.) | |
GetConnectionName | Gets a String containing the name of the connection. (Geerbt von Task.) | |
GetHashCode | Returns the hash code for this instance. (Geerbt von DtsObject.) | |
GetType | (Geerbt von Object.) | |
InitializeTask | Initializes the properties associated with the task. This method is called by the runtime and is not used in code. (Geerbt von Task.) | |
InternalExecute | Infrastruktur (Geerbt von ASTaskBase.) | |
InternalValidate | Infrastruktur (Geerbt von ASTaskBase.) | |
LoadFromXML | 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. | |
MemberwiseClone | (Geerbt von Object.) | |
SaveToXML | 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. | |
StopExecution | Infrastruktur (Geerbt von ASTaskBase.) | |
SubscribeToProgressEvent | Infrastruktur (Geerbt von ASTaskBase.) | |
ToString | (Geerbt von Object.) | |
UnsubscribeToProgressEvent | Infrastruktur (Geerbt von ASTaskBase.) | |
Update | *** Member deprecated; see Remarks. *** This method updates the old package XML with the new package XML if CanUpdate is set to true. (Geerbt von Task.) | |
Validate | Infrastruktur (Geerbt von ASTaskBase.) | |
ValidateConnection | Infrastruktur (Geerbt von ASTaskBase.) | |
ValidateDDL | Infrastruktur (Geerbt von ASTaskBase.) | |
WriteLog | Infrastruktur (Geerbt von ASTaskBase.) |
Zum Anfang
Felder
Name | Beschreibung | |
---|---|---|
bExecutionCanceled | Infrastruktur (Geerbt von ASTaskBase.) | |
bTraceError | Infrastruktur (Geerbt von ASTaskBase.) | |
ddl | Infrastruktur (Geerbt von ASTaskBase.) | |
m_events | Infrastruktur (Geerbt von ASTaskBase.) | |
server | Infrastruktur (Geerbt von ASTaskBase.) |
Zum Anfang
Beispiele
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=\"https://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 https://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
Threadsicherheit
Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.