www.dageop.com
Data
Modeling
®
DM-04 X-Events
DR. SUBRAMANI
PARAMASIVAM
(MANI)
About
me
Dr. SubraMANI Paramasivam
PhD., MCT, MCSE, MCITP, MCP, MCTS, MCSA
CEO, Principal Consultant & Trainer
@ DAGEOP (UK)
Email: mani@dageop.com
Blog: http://dataap.org/blog
Follow
Us
https://www.facebook.com/pages/YOUR-SQL-MAN-LTD/
http://www.youtube.com/user/YourSQLMAN
https://twitter.com/dageop
https://uk.linkedin.com/in/dageop
Proud Sponsor
• SQLBits
• SQL Saturdays
• MCT Summit
• SQL Server Geeks
Summit
• Data Awareness
Programme
• Dageop’s Data Day
®
www.DataAP.org
SPEAKER
Contents
• DM-04 X-Events
• Package Building
• Analysing captured results
www.dageop.com
Data Modeling
Introduction to Data Modeling
www.dageop.com
Data Modeling
Introduction to Data Modeling
• Data Modeling is a formalization and
documentation of existing process.
• Data Modeling techniques converts
complex designs to easily
understandable.
• Data Modeling can be thought of as
a diagram or flow chart that
illustrates the relationship between
data
• Undergoes Normalization /
Denormalization process.
www.dageop.com
Data Modeling
Introduction to Data Modeling
• Types Of Data Modeling
• Conceptual Data Modeling (CDM) :
Identifies the highest level of relation ship between different entities
• Enterprise Data Modeling (EDM) :
Similar to conceptual data Modeling but address the unique requirements
of specific business
• Logical Data Modeling (LDM) :
Illustrates the specific entities, Attributes and relations involved in a
business function
• Physical Data Modeling : much required for dB professionals
Represents an application and database specific implementation of LDM
www.dageop.com
Data Modeling
Physical Data Model
• Is a representation of a data
design.
• Includes the facilities and
constraints of a database
management system
www.dageop.com
Data Modeling
Physical Data Model
• The process of building the physical data model from Conceptual data
model.
• First Step : Conceptual data Model
• Second Step : Logical Model
• Final : Physical Data Model
www.dageop.com
Data Modeling
Physical Data Model
• A complete physical data model will include
• Physical storage
• Tables, Views, Data types
• Referential Integrity
• Primary Keys, Foreign keys, Constraints, Referential Integrity
• Programming
• Stored procedure, UDF, Triggers, CLR Function
• Indexes
• Partitioned tables
www.dageop.com
Data Modeling
DM-04 X-Events
www.dageop.com
Data Modeling
X-Events
• Event handling System
• Monitoring and Troubleshooting
• Less System Resource
• Fully Configurable and Automated
www.dageop.com
Data Modeling
Microsoft predicted that 20,000 events/sec on a 2 GHZ
Pentium with 1 GB RAM would use less than 2% of the CPU.
X-Events
www.dageop.com
Data Modeling
X-Events
WHY?
www.dageop.com
Data Modeling
X-Events
www.dageop.com
Data Modeling
SQL TRACE SQL PROFILER X-Event
Introduced in 2000 2000 2008
Server overhead Medium Low Very Low
Flexibility No No Easy
Customizable Hard Easy Very Easy
Performance Low Medium Very Fast
Server Resource High High Low
X-Events
• Extended Events Engine
• Packages
• Event Session
• Dispatcher pool
Package
Event
Action
Target
Predicate
Types
Maps
www.dageop.com
Data Modeling
DEMO
www.dageop.com
Data Modeling
Building Packages
www.dageop.com
Data Modeling
Packages
• It is a Container
• Totally 4 Packages are available
SELECT * FROM sys.dm_xe_packages
Package0
Sqlos
Sqlserver
SecAudit
www.dageop.com
Data Modeling
Packages
• Events
• Monitor Trace Events
• SELECT * FROM sys.dm_xe_objects WHERE object_type ='event’
• 259 Events – SQL Server 2008 R2
• Actions
• Describe the Event with SQL Statement text, execution plan handle.
• SELECT * FROM sys.dm_xe_objects WHERE object_type = 'action‘
• Targets
• Event Storing area
• SELECT * FROM sys.dm_xe_objects WHERE object_type ='target'
www.dageop.com
Data Modeling
Packages
• Predicates
• Filter events before sent to targets.
• SELECT * FROM sys.dm_xe_objects WHERE object_type in ('pred_compare',
'pred_source')
• Types
• A simple to complex data type used in event Payload.
• SELECT * FROM sys.dm_xe_objects WHERE object_type in ('type')
• Maps
• Like dictionaries maps some numeric internal values to a text.
• SELECT * FROM sys.dm_xe_objects WHERE object_type in ('map')
www.dageop.com
Data Modeling
Demo
www.dageop.com
Data Modeling
Analysing Captured Results
www.dageop.com
Data Modeling
Analysing captured results
• Capture the session targets with sys.dm_xe_session_targets
• For Example we have used target as
• XML File
• Get the Long Running Query from SQL_Text Column
www.dageop.com
Data Modeling
Demo
www.dageop.com
Data Modeling
www.dageop.com
Data Modeling
Review
 X-Events
Package Building
Analysing captured results
Q & A
www.dageop.com
Data Modeling
®
www.dageop.com

Data Modeling - Series 4 X-Events

  • 1.
  • 2.
    About me Dr. SubraMANI Paramasivam PhD.,MCT, MCSE, MCITP, MCP, MCTS, MCSA CEO, Principal Consultant & Trainer @ DAGEOP (UK) Email: mani@dageop.com Blog: http://dataap.org/blog Follow Us https://www.facebook.com/pages/YOUR-SQL-MAN-LTD/ http://www.youtube.com/user/YourSQLMAN https://twitter.com/dageop https://uk.linkedin.com/in/dageop Proud Sponsor • SQLBits • SQL Saturdays • MCT Summit • SQL Server Geeks Summit • Data Awareness Programme • Dageop’s Data Day ® www.DataAP.org SPEAKER
  • 3.
    Contents • DM-04 X-Events •Package Building • Analysing captured results www.dageop.com Data Modeling
  • 4.
    Introduction to DataModeling www.dageop.com Data Modeling
  • 5.
    Introduction to DataModeling • Data Modeling is a formalization and documentation of existing process. • Data Modeling techniques converts complex designs to easily understandable. • Data Modeling can be thought of as a diagram or flow chart that illustrates the relationship between data • Undergoes Normalization / Denormalization process. www.dageop.com Data Modeling
  • 6.
    Introduction to DataModeling • Types Of Data Modeling • Conceptual Data Modeling (CDM) : Identifies the highest level of relation ship between different entities • Enterprise Data Modeling (EDM) : Similar to conceptual data Modeling but address the unique requirements of specific business • Logical Data Modeling (LDM) : Illustrates the specific entities, Attributes and relations involved in a business function • Physical Data Modeling : much required for dB professionals Represents an application and database specific implementation of LDM www.dageop.com Data Modeling
  • 7.
    Physical Data Model •Is a representation of a data design. • Includes the facilities and constraints of a database management system www.dageop.com Data Modeling
  • 8.
    Physical Data Model •The process of building the physical data model from Conceptual data model. • First Step : Conceptual data Model • Second Step : Logical Model • Final : Physical Data Model www.dageop.com Data Modeling
  • 9.
    Physical Data Model •A complete physical data model will include • Physical storage • Tables, Views, Data types • Referential Integrity • Primary Keys, Foreign keys, Constraints, Referential Integrity • Programming • Stored procedure, UDF, Triggers, CLR Function • Indexes • Partitioned tables www.dageop.com Data Modeling
  • 10.
  • 11.
    X-Events • Event handlingSystem • Monitoring and Troubleshooting • Less System Resource • Fully Configurable and Automated www.dageop.com Data Modeling
  • 12.
    Microsoft predicted that20,000 events/sec on a 2 GHZ Pentium with 1 GB RAM would use less than 2% of the CPU. X-Events www.dageop.com Data Modeling
  • 13.
  • 14.
    X-Events www.dageop.com Data Modeling SQL TRACESQL PROFILER X-Event Introduced in 2000 2000 2008 Server overhead Medium Low Very Low Flexibility No No Easy Customizable Hard Easy Very Easy Performance Low Medium Very Fast Server Resource High High Low
  • 15.
    X-Events • Extended EventsEngine • Packages • Event Session • Dispatcher pool Package Event Action Target Predicate Types Maps www.dageop.com Data Modeling
  • 16.
  • 17.
  • 18.
    Packages • It isa Container • Totally 4 Packages are available SELECT * FROM sys.dm_xe_packages Package0 Sqlos Sqlserver SecAudit www.dageop.com Data Modeling
  • 19.
    Packages • Events • MonitorTrace Events • SELECT * FROM sys.dm_xe_objects WHERE object_type ='event’ • 259 Events – SQL Server 2008 R2 • Actions • Describe the Event with SQL Statement text, execution plan handle. • SELECT * FROM sys.dm_xe_objects WHERE object_type = 'action‘ • Targets • Event Storing area • SELECT * FROM sys.dm_xe_objects WHERE object_type ='target' www.dageop.com Data Modeling
  • 20.
    Packages • Predicates • Filterevents before sent to targets. • SELECT * FROM sys.dm_xe_objects WHERE object_type in ('pred_compare', 'pred_source') • Types • A simple to complex data type used in event Payload. • SELECT * FROM sys.dm_xe_objects WHERE object_type in ('type') • Maps • Like dictionaries maps some numeric internal values to a text. • SELECT * FROM sys.dm_xe_objects WHERE object_type in ('map') www.dageop.com Data Modeling
  • 21.
  • 22.
  • 23.
    Analysing captured results •Capture the session targets with sys.dm_xe_session_targets • For Example we have used target as • XML File • Get the Long Running Query from SQL_Text Column www.dageop.com Data Modeling
  • 24.
  • 25.
  • 26.
  • 27.