Home > SSIS > Fetch SQL Server Service details with WMI Data Reader Task

Fetch SQL Server Service details with WMI Data Reader Task


WMI

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.

Implementation:

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

  1. 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. 🙂

Advertisements
Categories: SSIS Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: