WMI for the  Command Line DBA Jason Massie Lead Database Consultant Terremark Worldwide DAT403
WMI For Command Line DBA Session Agenda WMI Tools and Utilities What is WMI? SQL Server as a WMI Provider Why use WMI? A WQL Primer Technologies in Play SQL Server as a WMI Consumer
What Is WMI? An overview of WMI What is Windows Management Interface? Extension of windows driver model that provides an  OS interface to information and notifications WMI is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF) WMI and SQL Server SQL Server as a provider SQL Server as a consumer SSIS as a consumer
Why Do I Care About WMI? Benefits of tapping into  WMI Access OS data that was previously hard to get from SQL Access trace data without running a trace Log DDL events Add better intelligence to expensive queries Respond to events in SSIS Augment your monitoring system
WMI Architecture Web-Based Enterprise Management (WBEM) Windows Management Interface (WMI) Windows Perfmon Data EventLogs Hardware Disk Usage  Process Info Service info Much more! SQL Server Trace Events DDL Events SSIS Tasks Custom Code
WMI Tools And Utilities Let's start off with the GUI's Microsoft tools WMI Code Creator Scriptomatic 2.0 WBEMTest 3 rd  Party WMI Explorer WQL Analyzer Most monitoring tools
WQL Overview Hey, that looks familiar… Subset of ANSI SQL Event query example SELECT *  FROM __InstanceCreationEvent WITHIN 10 WHERE Targetinstance ISA "CIM_DirectoryContainsFile"  and TargetInstance.GroupComponent= "Win32_Directory.Name=\"e:\\\\temp\"" Data query example Select *  from Win32_NTLogEvent  Where Logfile = ‘Application'  and EventType = ‘error'  and SourceName like ‘%SQL%’
WMI Tools and Utilities
Technologies In Play A partial list Consumers .Net VBScript PowerShell SSIS 3 rd  Party Providers SQL Server Windows Hardware
Quick and Dirty
CLR Integration
Displaying WMI data in SSRS
Powershell
WMI Provider for  Server Events
 
Let’s Connect Email: jason@statisticsio.com Blog: http://statisticsio.com RSS: http://feeds.feedburner.com/statisticsio LinkedIN: http://linkedin.com/in/jasonmassie Twitter: http://twitter.com/statisticsio FriendFeed: http://friendfeed.com/statisticsio I welcome questions or comments. I am open to networking.
Track Resources Resource 1 My blog – http://statisticsio.com Resource 2 MSDN WMI Class Reference - http://msdn.microsoft.com/en-us/library/aa394554%28VS.85%29.aspx Resource 3 MSDN PowerShell Reference - http://msdn.microsoft.com/en-us/library/bb905330.aspx Resource 4 – MSDN SQL Reference - http://msdn.microsoft.com/en-us/library/bb545450.aspx
 
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
 

Dat403 Massie

  • 1.
    WMI for the Command Line DBA Jason Massie Lead Database Consultant Terremark Worldwide DAT403
  • 2.
    WMI For CommandLine DBA Session Agenda WMI Tools and Utilities What is WMI? SQL Server as a WMI Provider Why use WMI? A WQL Primer Technologies in Play SQL Server as a WMI Consumer
  • 3.
    What Is WMI?An overview of WMI What is Windows Management Interface? Extension of windows driver model that provides an OS interface to information and notifications WMI is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF) WMI and SQL Server SQL Server as a provider SQL Server as a consumer SSIS as a consumer
  • 4.
    Why Do ICare About WMI? Benefits of tapping into WMI Access OS data that was previously hard to get from SQL Access trace data without running a trace Log DDL events Add better intelligence to expensive queries Respond to events in SSIS Augment your monitoring system
  • 5.
    WMI Architecture Web-BasedEnterprise Management (WBEM) Windows Management Interface (WMI) Windows Perfmon Data EventLogs Hardware Disk Usage Process Info Service info Much more! SQL Server Trace Events DDL Events SSIS Tasks Custom Code
  • 6.
    WMI Tools AndUtilities Let's start off with the GUI's Microsoft tools WMI Code Creator Scriptomatic 2.0 WBEMTest 3 rd Party WMI Explorer WQL Analyzer Most monitoring tools
  • 7.
    WQL Overview Hey,that looks familiar… Subset of ANSI SQL Event query example SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE Targetinstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name=\"e:\\\\temp\"" Data query example Select * from Win32_NTLogEvent Where Logfile = ‘Application' and EventType = ‘error' and SourceName like ‘%SQL%’
  • 8.
    WMI Tools andUtilities
  • 9.
    Technologies In PlayA partial list Consumers .Net VBScript PowerShell SSIS 3 rd Party Providers SQL Server Windows Hardware
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
    WMI Provider for Server Events
  • 15.
  • 16.
    Let’s Connect Email:jason@statisticsio.com Blog: http://statisticsio.com RSS: http://feeds.feedburner.com/statisticsio LinkedIN: http://linkedin.com/in/jasonmassie Twitter: http://twitter.com/statisticsio FriendFeed: http://friendfeed.com/statisticsio I welcome questions or comments. I am open to networking.
  • 17.
    Track Resources Resource1 My blog – http://statisticsio.com Resource 2 MSDN WMI Class Reference - http://msdn.microsoft.com/en-us/library/aa394554%28VS.85%29.aspx Resource 3 MSDN PowerShell Reference - http://msdn.microsoft.com/en-us/library/bb905330.aspx Resource 4 – MSDN SQL Reference - http://msdn.microsoft.com/en-us/library/bb545450.aspx
  • 18.
  • 19.
    © 2008 MicrosoftCorporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 20.

Editor's Notes

  • #2 06/03/09 13:10 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.