Professional SQL Server™ 2005 Integration Services
by Brian Knight, Allan Mitchell, Darren Green, Douglas Hinson, Kathi Kellenberger, Andy Leonard, Erik Veerman, Jason Gerard, Haidong Ji, Mike Murphy
16.5. Windows Management Instrumentation Tasks
SSIS includes two special tasks that allow you to query system information and monitor system events. These tasks are the WMI Data Reader task and the WMI Event Watcher task. WMI uses a specialized query language known as WQL, which is similar to SQL, to obtain information about a Windows system. I am not going to get into all the features and capabilities of WMI in this section, but here are a few possible uses:
You can get information on files and directories, such as file size, or enumerate the files in a folder. You can also monitor the file system for events, such as whether a file has been modified recently. This could be required in a package if your package is importing data from a CSV or XML file. A change in the file could trigger tasks to fire in your package.
You can find out if an application is currently running. In addition, you can find out how much memory that application is using or how much processor time it has used. This would be useful if your package needed to know if a companion process was running before creating some sort of output result.
You can obtain information about users in Active Directory, such as whether a user is active or if they have certain permissions on a resource. This would be useful in a package if information about a user or machine on the network is required for your package's execution.
You can control services that are running on a computer system and actually start and stop them as required. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access