Fetch SQL Server Service details with WMI Data Reader Task
Windows Management Instrumentation (WMI) is the infrastructure for management data in window based operating system. We can fetch data using WQL query.
Learn more about the WMI infrastructure here.
WMI Code create Utility
If you wish to have a look at the WMI data structure then this tool will help you to view the Namespace, methods and properties of an object. I will also generate WMI script that we can save and execute later.
Click here to Download
WMI Data Reader Task
We can execute WMI query using this task and store the output in a flat file or variable. It is most useful task in SSIS that helps administrator or developer to fetch the windows infrastructure data.
In this article I will be fetching Microsoft SQL Server Services information using WMI Data Reader Task.
Step 1: Open a new SSIS Project and add WMI Data Reader Task.
Step 2: Open Task Editor (Right click on the task & select Edit option) and go to WMI Options tab
Step 3: Create WmiConnection
- Select New connection
2. Provide Namespace and authentication details
Step 4: Select WqlQuerySourceType to direct input and write WQL query in the WqlQuerySource property
Step 5: Create a new flat file connection to store the WMI output. I have already created a flat file connection with name WMI_Output.txt.
Step 6: Click OK and Execute the package
Thanks for reading. See you in the next post. Have a Happy weekend. 🙂