Dat403 Massie

726 views

Published on

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • ehhh, they fail at powerpoint 2007.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total views
726
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
10
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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.
  • Dat403 Massie

    1. 1. WMI for the Command Line DBA Jason Massie Lead Database Consultant Terremark Worldwide <ul><li>DAT403 </li></ul>
    2. 2. 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
    3. 3. What Is WMI? An overview of WMI <ul><li>What is Windows Management Interface? </li></ul><ul><ul><li>Extension of windows driver model that provides an OS interface to information and notifications </li></ul></ul><ul><ul><li>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) </li></ul></ul><ul><li>WMI and SQL Server </li></ul><ul><ul><li>SQL Server as a provider </li></ul></ul><ul><ul><li>SQL Server as a consumer </li></ul></ul><ul><ul><li>SSIS as a consumer </li></ul></ul>
    4. 4. Why Do I Care About WMI? Benefits of tapping into WMI <ul><li>Access OS data that was previously hard to get from SQL </li></ul><ul><li>Access trace data without running a trace </li></ul><ul><li>Log DDL events </li></ul><ul><li>Add better intelligence to expensive queries </li></ul><ul><li>Respond to events in SSIS </li></ul><ul><li>Augment your monitoring system </li></ul>
    5. 5. WMI Architecture Web-Based Enterprise Management (WBEM) Windows Management Interface (WMI) Windows <ul><li>Perfmon Data </li></ul><ul><li>EventLogs </li></ul><ul><li>Hardware </li></ul><ul><li>Disk Usage </li></ul><ul><li>Process Info </li></ul><ul><li>Service info </li></ul><ul><li>Much more! </li></ul>SQL Server <ul><li>Trace Events </li></ul><ul><li>DDL Events </li></ul><ul><li>SSIS Tasks </li></ul><ul><li>Custom Code </li></ul>
    6. 6. WMI Tools And Utilities Let's start off with the GUI's <ul><li>Microsoft tools </li></ul><ul><ul><li>WMI Code Creator </li></ul></ul><ul><ul><li>Scriptomatic 2.0 </li></ul></ul><ul><ul><li>WBEMTest </li></ul></ul><ul><li>3 rd Party </li></ul><ul><ul><li>WMI Explorer </li></ul></ul><ul><ul><li>WQL Analyzer </li></ul></ul><ul><ul><li>Most monitoring tools </li></ul></ul>
    7. 7. WQL Overview Hey, that looks familiar… <ul><li>Subset of ANSI SQL </li></ul><ul><ul><li>Event query example </li></ul></ul><ul><ul><li>SELECT * </li></ul></ul><ul><ul><li>FROM __InstanceCreationEvent WITHIN 10 WHERE Targetinstance ISA &quot;CIM_DirectoryContainsFile&quot; </li></ul></ul><ul><ul><li>and TargetInstance.GroupComponent= &quot;Win32_Directory.Name=&quot;e:temp&quot;&quot; </li></ul></ul><ul><ul><li>Data query example </li></ul></ul><ul><ul><li>Select * </li></ul></ul><ul><ul><li>from Win32_NTLogEvent </li></ul></ul><ul><ul><li>Where Logfile = ‘Application' </li></ul></ul><ul><ul><li>and EventType = ‘error' </li></ul></ul><ul><ul><li>and SourceName like ‘%SQL%’ </li></ul></ul>
    8. 8. WMI Tools and Utilities
    9. 9. Technologies In Play A partial list <ul><li>Consumers </li></ul><ul><ul><li>.Net </li></ul></ul><ul><ul><li>VBScript </li></ul></ul><ul><ul><li>PowerShell </li></ul></ul><ul><ul><li>SSIS </li></ul></ul><ul><ul><li>3 rd Party </li></ul></ul><ul><li>Providers </li></ul><ul><ul><li>SQL Server </li></ul></ul><ul><ul><li>Windows </li></ul></ul><ul><ul><li>Hardware </li></ul></ul>
    10. 10. Quick and Dirty
    11. 11. CLR Integration
    12. 12. Displaying WMI data in SSRS
    13. 13. Powershell
    14. 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.
    16. 17. Track Resources <ul><li>Resource 1 My blog – http://statisticsio.com </li></ul><ul><li>Resource 2 MSDN WMI Class Reference - http://msdn.microsoft.com/en-us/library/aa394554%28VS.85%29.aspx </li></ul><ul><li>Resource 3 MSDN PowerShell Reference - http://msdn.microsoft.com/en-us/library/bb905330.aspx </li></ul><ul><li>Resource 4 – MSDN SQL Reference - http://msdn.microsoft.com/en-us/library/bb545450.aspx </li></ul>
    17. 19. © 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.

    ×