语言

WmiEventWatcherTask 类

定义

包含用于配置和运行 WMI 事件观察任务的成员,该任务运行 Windows 管理仪器(WMI)查询并返回关于计算机系统的 WMI 数据。 此类不能被继承。

public ref class WmiEventWatcherTask sealed : Microsoft::SqlServer::Dts::Runtime::Task, Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite, Microsoft::SqlServer::Dts::Runtime::IDTSComponentPersist, Microsoft::SqlServer::Dts::Tasks::WmiEventWatcherTask::IWmiEventWatcherTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.wmieventwatchertask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.Localized), SamplesTag="SsisWmiEventWatcherTask", TaskContact="WMI Event Watcher Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTaskUI.WmiEventWatcherTaskUI, Microsoft.SqlServer.WMIEWTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("3F9BD2DF-08F5-4809-8946-2A3694DBF6F3")]
public sealed class WmiEventWatcherTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.IWmiEventWatcherTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.wmieventwatchertask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.Localized), SamplesTag="SsisWmiEventWatcherTask", TaskContact="WMI Event Watcher Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTaskUI.WmiEventWatcherTaskUI, Microsoft.SqlServer.WMIEWTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("8984C204-B19A-4EEC-9A66-C4329CB8A27F")]
public sealed class WmiEventWatcherTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.IWmiEventWatcherTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.wmieventwatchertask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.Localized), SamplesTag="SsisWmiEventWatcherTask", TaskContact="WMI Event Watcher Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTaskUI.WmiEventWatcherTaskUI, Microsoft.SqlServer.WMIEWTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("DE6F9E8F-435D-4F98-BF59-0C03EF080720")]
public sealed class WmiEventWatcherTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.IWmiEventWatcherTask
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.wmieventwatchertask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.Localized), SamplesTag="SsisWmiEventWatcherTask", TaskContact="WMI Event Watcher Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTaskUI.WmiEventWatcherTaskUI, Microsoft.SqlServer.WMIEWTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("3F9BD2DF-08F5-4809-8946-2A3694DBF6F3")>]
type WmiEventWatcherTask = class
    inherit Task
    interface IWmiEventWatcherTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
    interface IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.wmieventwatchertask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.Localized), SamplesTag="SsisWmiEventWatcherTask", TaskContact="WMI Event Watcher Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTaskUI.WmiEventWatcherTaskUI, Microsoft.SqlServer.WMIEWTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("8984C204-B19A-4EEC-9A66-C4329CB8A27F")>]
type WmiEventWatcherTask = class
    inherit Task
    interface IWmiEventWatcherTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
    interface IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.wmieventwatchertask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTask.Localized), SamplesTag="SsisWmiEventWatcherTask", TaskContact="WMI Event Watcher Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.WmiEventWatcherTaskUI.WmiEventWatcherTaskUI, Microsoft.SqlServer.WMIEWTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("DE6F9E8F-435D-4F98-BF59-0C03EF080720")>]
type WmiEventWatcherTask = class
    inherit Task
    interface IWmiEventWatcherTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
    interface IDTSComponentPersist
Public NotInheritable Class WmiEventWatcherTask
Inherits Task
Implements IDTSBreakpointSite, IDTSComponentPersist, IWmiEventWatcherTask
继承
WmiEventWatcherTask
属性
实现

注解

该类使用WMIConn连接连接到服务器,对其执行 Windows Management Instrumentation Query Language(WQL)查询,并等待与查询相关的事件发生。 任务随后会通知是否发生了WMI事件。 WQL查询可以直接提供,或者使用变量或文件连接在执行时动态提供WQL查询。

同样,该类可以使用文件连接或变量来接收WQL查询的结果。 也可以指定WQL查询结果的输出类型。

有关该任务功能的更多信息,请参见 WMI事件观察任务

构造函数

名称 说明
WmiEventWatcherTask()

初始化 WmiEventWatcherTask 类的新实例。

属性

名称 说明
ActionAtEvent

决定当任务接收到 Windows 管理仪表(WMI)事件时的WmiEventWatcherTask响应方式。

ActionAtTimeout

确定当任务超时且未收到指定的 Windows 管理仪表(WMI)事件时,该系统WmiEventWatcherTask如何响应。

AfterEvent

决定当任务接收到指定的 Windows 管理仪表(WMI)事件时,该WmiEventWatcherTask任务的响应方式。

AfterTimeout

确定当任务超时且未收到指定的 Windows 管理仪表(WMI)事件时,该系统WmiEventWatcherTask如何响应。

DebugMode

一个布尔值, WmiEventWatcherTask 表示是否应检查断点是否被启用。

ExecutionValue

获得包含任务结果 WmiEventWatcherTask 的对象。

NumberOfEvents

获取或设置应WmiEventWatcherTask关注的 Windows 管理仪器(WMI)事件数量。

SuspendRequired

获得或设置一个布尔值,指示任务在遇到断点时是否应暂停。 当遇到断点时,运行时引擎为任务和容器设置该值。

TargetServerVersion

包含用于配置和运行 WMI 事件观察任务的成员,该任务运行 Windows 管理仪器(WMI)查询并返回关于计算机系统的 WMI 数据。 此类不能被继承。

(继承自 Task)
Timeout

获取或设置任务应等待的秒数,以接收 Windows 管理仪表(WMI)事件后才超时。

Version

成员被淘汰;参见备注。 返回任务版本。 此属性为只读。

(继承自 Task)
WmiConnection

获取或设置任务所WmiEventWatcherTask使用的类名称WMIConn

WqlQuerySource

获取或设置 Windows 管理仪表查询语言(WQL)查询的源代码,由 WmiEventWatcherTask执行。

WqlQuerySourceType

获取或设置QuerySourceType一个值,表示 Windows 管理仪器查询语言(WQL)WmiEventWatcherTask查询的源类型(如文件连接或变量),由 执行。

方法

名称 说明
AcceptBreakpointManager(BreakpointManager)

传递 BreakpointManager 任务的 WmiEventWatcherTask 引用。 该方法由运行时调用,不用于代码中。

CanUpdate(String)

成员被淘汰;参见备注。 一个布尔值,表示新包的 XML 是否可以更新旧包的 XML。

(继承自 Task)
Equals(Object)

确定两个对象实例是否相等。

(继承自 DtsObject)
Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

他负责执行任务。

GetConnectionID(Connections, String)

获得包含连接ID的字符串。

(继承自 Task)
GetConnectionName(Connections, String)

获得包含连接名称的字符串。

(继承自 Task)
GetHashCode()

返回此实例的哈希代码。

(继承自 DtsObject)
InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

初始化与 WmiEventWatcherTask 任务相关的属性。 该方法由运行时调用,不用于代码中。

LoadFromXML(XmlElement, IDTSInfoEvents)

你的应用代码无法调用此方法。 要加载保存为 .xml的包裹,请使用以下 LoadPackage(String, IDTSEvents) 方法。

ResumeExecution()

暂停后继续执行任务。 任务或容器由运行时引擎恢复。

SaveToXML(XmlDocument, IDTSInfoEvents)

你的应用代码无法调用此方法。 要将包保存为 .xml,请使用以下 SaveToXml(String, Package, IDTSEvents) 方法。

SuspendExecution()

表示可执行文件需要暂停。 该方法由运行时引擎调用。

Update(String)

成员被淘汰;参见备注。 如果 CanUpdate(String) 将 设置为 true,该方法将旧包 XML 更新为新的包 XML。

(继承自 Task)
Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

验证任务配置正确。

适用于