WMI Data Reader Task
The WMI Data Reader task runs queries using the Windows Management Instrumentation (WMI) Query Language that returns information from WMI about a computer system. You can use the WMI Data Reader task for the following purposes:
- Query the Windows event logs on a local or remote computer and write the information to a file or variable.
- Obtain information about the presence, state, or properties of hardware components, and then use this information to determine whether other tasks in the control flow should run.
- Get a list of applications and determine what version of each application is installed.
You can configure the WMI Data Reader task in the following ways:
- Specify the WMI connection manager to use.
- Specify the source of the WQL query. The query can be stored in a task property, or the query can be stored outside the task, in a variable or a file.
- Define the format of the WQL query results. The task supports a table, property name/value pair, or property value format.
- Specify the destination of the query. The destination can be a variable or a file.
- Indicate whether the query destination is overwritten, kept, or appended.
If the source or destination is a file, the WMI Data Reader task uses a File connection manager to connect to the file. For more information, see Flat File Connection Manager.
The WMI Data Reader task uses a WMI connection manager to connect to the server from which it reads WMI information. For more information, see WMI Connection Manager.
WQL Query Samples
WQL is a dialect of SQL with extensions to support WMI event notification and other WMI-specific features. For more information about WQL, see the Windows Management Instrumentation documentation in the MSDN Library.
WMI classes vary between versions of Windows. These sample queries are valid in Windows XP, but may not be valid in earlier versions of Windows.
The following WQL query returns entries in the Application log event.
SELECT * FROM Win32_NTLogEvent WHERE LogFile = 'Application' AND (SourceName='SQLISService' OR SourceName='SQLISPackage') AND TimeGenerated > '20050117'
The following WQL query returns logical disk information.
SELECT FreeSpace, DeviceId, Size, SystemName, Description FROM Win32_LlogicalDisk
The following WQL query returns a list of the quick fix engineering (QFE) updates to the operating system.
Select * FROM Win32_QuickFixEngineering
Other Related Tasks
Integration Services includes a task that waits for WMI event notifications and can fire an action in response.
For more information about this task, click the following topic:
Custom Logging Messages Available on the WMI Data Reader Task
Indicates that the task began to read WMI data.
Reports the WQL query that the task ran.
Configuring the WMI Data Reader Task
You can set properties programmatically or through SSIS Designer.
For more information about the properties that you can set in SSIS Designer, click one of the following topics:
For more information about how to set these properties in SSIS Designer, click the following topic:
Configuring the WMI Data Reader Task Programmatically
For more information about programmatically setting these properties, click the following topic:
Help and Information
17 July 2006