September 15, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Incorporate Data Warehouse QA Checks into MOM 2005

  • June 12, 2006
  • By Jeffrey Juday
  • Send Email »
  • More Articles »

Hosting the WMI Class

As previously stated, the WMI support built into .NET is dynamic. So, you need running code to host the WMI class. The sample solution uses a desktop application. Your implementation probably will create a Windows service. (For an introduction to building a Windows service, read "Creating a Windows Service in .NET".)

In the sample solution, AggWMIInstWriter reads the measures from a SQL database, populates an instance of AggregateValueWMIInstance, and publishes the class to WMI. The following code publishes the instance to WMI and in doing so makes the data visible to MOM:

private void UpdateNewMeasure(string measureKey,
                              AggregateValueWMIInstance inst)
{
   AggregateValueWMIInstance instCur = null;
   if (_mySortedList.TryGetValue(measureKey, out instCur))
   {
      instCur.Revoke();    //Hide the data from WMI
      //It's there, so replace it
      _mySortedList.Remove(measureKey);
      _mySortedList.Add(measureKey, inst);
   }
   else
   {
      _mySortedList.Add(measureKey, inst);
   }
     inst.Publish();       //Display it in WMI
}

One interesting thing to note in the code is the use of the new .NET Framework 2.0 Generic class collections for type safety.

Now that the data has been loaded into WMI, the only task remaining is creating MOM rules to read the data.

MOM Implementation

Once you have data in WMI, implementing with MOM is straightforward. Adding WMI instance monitoring to MOM is beyond the scope of this article; the following summations share some of the key configuration dialogs:

  1. You use the MOM WMI numeric provider function. Configure the MOM numeric provider as shown in Figure 1.

    Figure 1: Configuration of MOM Numeric Provider

    You can change the example to sample more or less frequently.

  2. The next key to configuring MOM is to create a rule and select the provider you created in Step 1 (see Figures 2 and 3).

    Figure 2: MOM Performance Rule #1

    Figure 3: MOM Performance Rule #2

  3. Finally, use MOM to start sampling the data.



    Click here for a larger image.

    Figure 4: Starting MOM

The complexity of your rule is limited by the capabilities of MOM. As previously stated, when a MOM rule executes, MOM can respond to it by sending notifications or running applications.

Preserve Data Warehouse Integrity

Flash totals and other QA checks are critical for preserving the integrity of your data warehouse. By using WMI and the .NET Framework, you can incorporate QA checks into your Microsoft Operations Manager rules and notifications.

Download the Code

You can download the code that accompanies the article here.

About the Author

Jeffrey Juday is a software developer with Crowe Chizek in South Bend, Indiana. He has been developing software with Microsoft tools for more than 12 years in a variety of industries. Jeff currently builds solutions using BizTalk 2004, ASP.NET, SharePoint, and SQL Server 2000. You can reach Jeff at jjuday@crowechizek.com.

Acknowledgements

Special thanks to Dustin Hannifin, my company's MOM administrator, for his expertise and assistance with this article.





Page 2 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel