Data Modeling - Series 4 X-Events

27
www.dageop.com Data Modeling ® DM-04 X-Events DR. SUBRAMANI PARAMASIVAM (MANI)

Transcript of Data Modeling - Series 4 X-Events

Page 1: Data Modeling - Series 4 X-Events

www.dageop.com

Data Modeling

®

DM-04 X-Events

DR. SUBRAMANI PARAMASIVAM (MANI)

Page 2: Data Modeling - Series 4 X-Events

About me

Dr. SubraMANI ParamasivamPhD., MCT, MCSE, MCITP, MCP, MCTS, MCSACEO, Principal Consultant & Trainer @ DAGEOP (UK) Email: [email protected] 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

Page 3: Data Modeling - Series 4 X-Events

Contents• DM-04 X-Events• Package Building• Analysing captured results

www.dageop.comData Modeling

Page 4: Data Modeling - Series 4 X-Events

Introduction to Data Modeling

www.dageop.comData Modeling

Page 5: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 6: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 7: Data Modeling - Series 4 X-Events

Physical Data Model

• Is a representation of a data design.• Includes the facilities and

constraints of a database management system

www.dageop.comData Modeling

Page 8: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 9: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 10: Data Modeling - Series 4 X-Events

DM-04 X-Events

www.dageop.comData Modeling

Page 11: Data Modeling - Series 4 X-Events

X-Events• Event handling System

• Monitoring and Troubleshooting

• Less System Resource

• Fully Configurable and Automated

www.dageop.comData Modeling

Page 12: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 13: Data Modeling - Series 4 X-Events

X-Events

WHY?

www.dageop.comData Modeling

Page 14: Data Modeling - Series 4 X-Events

X-Events

www.dageop.comData 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

Page 15: Data Modeling - Series 4 X-Events

X-Events• Extended Events Engine

• Packages

• Event Session

• Dispatcher pool

Package

Event Action

Target

Predicate

Types

Maps

www.dageop.comData Modeling

Page 16: Data Modeling - Series 4 X-Events

DEMO

www.dageop.comData Modeling

Page 17: Data Modeling - Series 4 X-Events

Building Packages

www.dageop.comData Modeling

Page 18: Data Modeling - Series 4 X-Events

Packages• It is a Container

• Totally 4 Packages are available

SELECT * FROM sys.dm_xe_packagesPackage0

Sqlos

Sqlserver

SecAudit

www.dageop.comData Modeling

Page 19: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 20: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 21: Data Modeling - Series 4 X-Events

Demo

www.dageop.comData Modeling

Page 22: Data Modeling - Series 4 X-Events

Analysing Captured Results

www.dageop.comData Modeling

Page 23: Data Modeling - Series 4 X-Events

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.comData Modeling

Page 24: Data Modeling - Series 4 X-Events

Demo

www.dageop.comData Modeling

Page 25: Data Modeling - Series 4 X-Events

www.dageop.comData Modeling

Review X-Events

Package BuildingAnalysing captured results

Page 26: Data Modeling - Series 4 X-Events

Q & A

www.dageop.comData Modeling

Page 27: Data Modeling - Series 4 X-Events

®

www.dageop.com