Hey powershell e venting can y ou n otify m e
Download
1 / 13

Hey PowerShell E venting, Can Y ou N otify M e ? - PowerPoint PPT Presentation


  • 73 Views
  • Uploaded on

Hey PowerShell E venting, Can Y ou N otify M e ?. Laerte Junior @ laertesqldba www.shellyourexperience.wordpress.com http://www.simple-talk.com/author/laerte-junior / http://sqlpsx.codeplex.com /. Brazil. My Skills. I Know a Bit of PowerShell (3 years)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Hey PowerShell E venting, Can Y ou N otify M e ?' - haviva-barnett


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Hey powershell e venting can y ou n otify m e

Hey PowerShell Eventing, Can You Notify Me ?

Laerte Junior @laertesqldba

www.shellyourexperience.wordpress.com

http://www.simple-talk.com/author/laerte-junior/

http://sqlpsx.codeplex.com/



My skills
My Skills

  • I Know a Bit of PowerShell (3 years)

  • I DO like to play with SQL Server (12 years)

  • BETTER COFFE MAKER FROM BRAZIL (30 years)


Notification system
Notification System

  • Your Bank send a SMS about a transaction

  • Your car warning you when something wrong happens

  • Your body alerts you when something is not right



WMI

  • WMI is an acronym for Windows Management Instrumentation

    • Registry, File and Disk systems, Services and processes, Printers ,Networking, IIS, Performance Counters

  • WMI Provider For Server Events

    • The WMI Provider for Server Events lets you use the Windows Management Instrumentation (WMI) to monitor events in SQL Server.


W indows m anagement i nstrumentation q uery l anguage
Windows Management Instrumentation Query Language

  • SQL ANSI with WMI-Specific Extensions

  • SELECT{ event_property [ ,...n ] | * } FROM event_type WHERE where_condition

    EVENT QUERY LANGUAGE

    SELECT <Propertie-List> FROM <Event-Class Name> <WITHIN Seconds> WHERE <Instace-State> ISA '<Wmi-Class Name>'

    "select * from __InstanceModificationEvent within 5 where TargetInstance ISA 'Win32_Service' and TargetInstance.Name='MSSQLSERVER' and TargetInstance.State='Stopped‘”


The beauty of wql
THE BEAUTY OF WQL

  • WQL for WMI/WMI SQL

  • WQL For Event Query



WMI/WQL – EVENT QUERY

  • Show a Balloon tip (SQL Server Stops)

  • Alert CPU Threshold

  • Alert SQL Server Process CPU Threshold

  • Alert Free Disk Space

    WMI/WQL – Server Events

  • Monitoring Database Mirroring

  • Monitoring Database Suspect Pages

  • Mointoring Database Options (eventlog)


What is The Ideia ?

Server 1

Register The Event

Monitoring Server

Trigger The Event

Write in EventLog

Server 2

Register The Event

Trigger The Event

Write in EventLog

Trigger The Event

Send Email


Coming up

Coming up…

  • #SQLBITS


ad