Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extended Events: Successful troubleshooting recipes

Similar presentations


Presentation on theme: "Extended Events: Successful troubleshooting recipes"— Presentation transcript:

1 Extended Events: Successful troubleshooting recipes
Dennes Torres Extended Events: Successful troubleshooting recipes

2 Speaker Bio Senior Software Developer Trainer
Ascent Software Trainer MCT, MCSE Data Platform, MCSE BI, MCSD Web Development Malta Data Platform UG Leader Malta MMDPUG Dennes.Torres @Dennes

3 Our generous sponsors

4 Why move to Extended Events
On This Session Why move to Extended Events Motivation to move to Extended Events Troubleshooting recipes

5 Agenda Introduction Blocked Process Report Sort Spills Deadlocks
Log Flushes Improving the use of the recipes Much More

6 Introduction

7 It was Deprecated in SQL Server 2014
Profiler Deprecated It was Deprecated in SQL Server 2014 There is no date to be removed It should be replaced by Extended Events

8 SQL Trace is the server side
SQL Profiler It’s only a client tool SQL Trace is the server side SQL Trace is also deprecated

9 Performance

10 Reading Extended Events Data
Watch live data Export to Table XML Queries Automated XML Queries Real time response

11 Blocked Pocess

12 Blocked Process Problem Identify the Problem Solve the Problem
Identify the source of blocking problems in a slow environment Identify the Problem Configure Blocked Process Threshold on server level Never configure for less then 5 seconds Capture information about the blocked process Solve the Problem Adjust transactions and lock hints to avoid blocking

13 Recipe Directions Event Filter Query Blocked_process_report None
Usual XML sauce

14 The configuration needs to be always over 5 seconds
How to Serve The configuration needs to be always over 5 seconds If you find too many repetitions, increase the configuration value

15 Demo Scripts BlockedProcess and BlockedProcess2

16 Sort Spills

17 Sort Spills in TempDB Problem Identifying the Problem
Outdated statistics can make a SORT operation spill data to tempdb Identifying the Problem Finding the query causing the sort spill you find the outdated statistic Solving the Problem Update the outdated statistics

18 Recipe Directions Event Actions Query
Use the event sqlserver.sort_warning Actions Sql_text and database_id are essential Query Usual XML sauce Translate the database_id

19 How to Serve Serve at will, no side effects

20 Demo Sort.sql

21 Deadlocks

22 Deadlocks Problem Identify the Problem Solve the Problem
Application problems can cause deadlocks in transactions Identify the Problem We need to identify the transactions involved in the deadlock Solve the Problem Usually the solution involves changing the application

23 Recipe Directions Event Filter Query
Use the event xml_deadlock_report Filter No filter Query The result is a XML inside the usual XE XML

24 How to Serve Serve at will, no side effects

25 Demo Deadlocks Deadlocks1 Deadlocks2

26 Log Flushes

27 Log Flushes Problem Identify the Problem Solve the Problem
High amounts of log flushes in batch processes impacts performance Identify the Problem Identify the total of log fluhes and compare with other versions of the process Solve the Problem Improve the batch process

28 Recipe Directions Evento Filter Query Use the event log_flush_start
Use the histogram output Use output to file to check the size of the log flush Filter You should filter by database Query Special XML sauce for histogram Usual XML sauce to check log flush size

29 How to Serve Use this recipe to identify the amount of log flushes while analyzing the performance of a batch and identify possible improvements

30 Demo LogFlush LogFlushData

31 Improving the Recipes

32 Making it easier Create a database for admin objects
Create a function for each query over the sessions The functions should be parameterized Use the functions instead of the big queries

33 Demo CreatingFunctions UsingFunctions

34 Much More

35 Much More Memory_Grant_Updated_By_Feedback Adaptive_join_skiped
Interleaved_Execution_failed Page_Split

36 Even More System_Health XE session

37 Speaker Bio Senior Software Developer Trainer
Ascent Software Trainer MCT, MCSE Data Platform, MCSE BI, MCSD Web Development Malta Data Platform UG Leader Malta MMDPUG Dennes.Torres @Dennes


Download ppt "Extended Events: Successful troubleshooting recipes"

Similar presentations


Ads by Google