Dat403 Massie

Post on 08-Dec-2014

980 views 0 download

Tags:

description

 

Transcript of Dat403 Massie

1

WMI for the Command Line DBA

Jason MassieLead Database ConsultantTerremark Worldwide

DAT403

2

WMI For Command Line DBASession 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 notificationsWMI 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 ServerSQL Server as a providerSQL Server as a consumerSSIS as a consumer

4

Why Do I Care About WMI?Benefits of tapping into WMI

Access OS data that was previously hard to get from SQLAccess trace data without running a traceLog DDL eventsAdd better intelligence to expensive queriesRespond to events in SSISAugment your monitoring system

5

WMI Architecture

Web-Based Enterprise Management (WBEM)Windows Management Interface (WMI)

WindowsPerfmon DataEventLogsHardwareDisk Usage Process InfoService infoMuch more!

SQL ServerTrace EventsDDL EventsSSIS TasksCustom Code

6

WMI Tools And UtilitiesLet's start off with the GUI's

Microsoft toolsWMI Code CreatorScriptomatic 2.0WBEMTest

3rd PartyWMI ExplorerWQL AnalyzerMost monitoring tools

7

WQL OverviewHey, that looks familiar…

Subset of ANSI SQLEvent query exampleSELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE Targetinstance ISA "CIM_DirectoryContainsFile" and TargetInstance.GroupComponent= "Win32_Directory.Name=\"e:\\\\temp\""

Data query exampleSelect * from Win32_NTLogEvent Where Logfile = ‘Application' and EventType = ‘error' and SourceName like ‘%SQL%’

8

WMI Tools and Utilities

9

Technologies In PlayA partial list

Consumers.NetVBScriptPowerShellSSIS3rd Party

ProvidersSQL ServerWindowsHardware

10

Quick and Dirty

11

CLR Integration

12

Displaying WMI data in SSRS

13

Powershell

14

WMI Provider for Server Events

15

16

Let’s Connect

Email: jason@statisticsio.comBlog: http://statisticsio.comRSS: http://feeds.feedburner.com/statisticsioLinkedIN: http://linkedin.com/in/jasonmassieTwitter: http://twitter.com/statisticsioFriendFeed: http://friendfeed.com/statisticsio

I welcome questions or comments. I am open to networking.

Track Resources

Resource 1 My blog – http://statisticsio.comResource 1 My blog – http://statisticsio.com

Resource 2 MSDN WMI Class Reference - Resource 2 MSDN WMI Class Reference - http://msdn.microsoft.com/en-us/library/aa394554%28VS.85%29.aspxhttp://msdn.microsoft.com/en-us/library/aa394554%28VS.85%29.aspx

Resource 3 MSDN PowerShell Reference - Resource 3 MSDN PowerShell Reference - http://msdn.microsoft.com/en-us/library/bb905330.aspxhttp://msdn.microsoft.com/en-us/library/bb905330.aspx

Resource 4 – MSDN SQL Reference - Resource 4 – MSDN SQL Reference - http://msdn.microsoft.com/en-us/library/bb545450.aspxhttp://msdn.microsoft.com/en-us/library/bb545450.aspx

Complete anComplete anevaluation evaluation ononCommNet CommNet andandenter to win!enter to win!

1 Year 1 Year Subscription!Subscription!

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.