Extended Events: Successful troubleshooting recipes

Slides:



Advertisements
Similar presentations
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Advertisements

Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Tempdb Parasites Jason Hall-Dir. of Client SQL Sentry Blog-jasonhall.blogs.sqlsentry.net.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Troubleshooting From the Field – Part 2 SQL DIAG & SQL NEXUS By Ahmad Osama SQL Server Geeks - Editor In Chief and Regional Mentor(Delhi & NCR)
Troubleshooting Replication and Geodata Services
1 The following presentation is from the Oracle Webcast “What’s New in P6 EPPM Release 8.1.” As a partner, you may not use the Oracle Power Point template,
How to solve a SQL performance problem Paul Zgondea.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
Enterprise Database Administration & Deployment SIG ▪ 313M ▪ Sept 29, 2005 ▪ 10:15 AM SQL Server 2005 Performance Diagnosis and Tuning using SQL Tools.
The X-Factor of the Extended Events Amit Khandelwal.
EOH: A Microsoft Partner INTRODUCTION TO EXTENDED EVENTS.
Common SQL Performance Issues AND HOW TO AVOID OR FIX THEM.
TECHVERZE Oracle BI Publisher Online Training. Introduction to Oracle BI Publisher Oracle BI Publisher is the reporting solution to deliver, author, and.
Deadlocks 3.0. Final Edition. Everything that developer needs to know Denis Reznik Microsoft SQL Server MVP Director of R&D at Intapp Kyiv.
Does the Optimistic Concurrency resolve your blocking problems Margarita Naumova, SQL Master Academy.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
Session Name Pelin ATICI SQL Premier Field Engineer.
SQL Server Magic Buttons! What are Trace Flags and why should I care? Steinar Andersen, SQL Service Nordic AB Thanks to Thomas Kejser for peer-reviewing.
ROLLING DATABASE SNAPSHOTS David Cobb Daveslog.com.
Advanced BIML topics Be a W.I.S.E. A.S.S. Me ! Self-employed BI consultant Author Trainer MCT
SQL Saturday #509 | Brisbane 2016 #509 | Brisbane 2016 Martin Catherall Moving from Profiler to Extended Events.
SQL Server DBA Online TrainingSQL Server DBA Online Training.
Real-time Performance Monitoring for SQL Server and Dynamics AX
Integrating ArcSight with Enterprise Ticketing Systems
An introduction to Wait Statistics
Benchmarking like a PRO
Integrating ArcSight with Enterprise Ticketing Systems
Extended Events
SQL Server Statistics 101 Travis Whitley Senior Consultant, Oakwood Systems whitleysql.wordpress.com.
Building a Performance Monitoring System using XEvents and DMVs
Building a Performance Monitoring System using XEvents and DMVs
Designing Database Solutions for SQL Server
Isolation Levels Understanding Transaction Temper Tantrums
Extend Your Knowledge with Extended Events!
Contained DB? Did it do something wrong?
TechEd /13/2018 7:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Dumps Question Answer - Dumps4download
Simplifying XEvents Management with dbatools
Performance Monitoring Using Extended Events, DMVs & Query Store
Introducing the SQL Server 2016 Query Store
Building a Performance Monitoring System using XEvents and DMVs
Marcos Freccia Stop everything! Top T-SQL tricks to a developer
Tapping the Power of Your Historical Data
Performance Tuning for Mere Mortals Part II
Cardinality Estimator 2014/2016
Wellington, SQLSaturday#706
Migrating your SQL Server Instance
dbatools - PowerShell and SQL Server Working Together
Azure's Performance, Scalability, SQL Servers Automate Real Time Data Transfer at Low Cost MINI-CASE STUDY “Azure offers high performance, scalable, and.
Statistics: What are they and How do I use them
Performance Tuning for Mere Mortals Part II
TEMPDB – INTERNALS AND USAGE
Enterprise Auditing with SQL Server Audit
Targeting Wait Statistics with Extended Events
Moving from SQL Profiler to xEvents
Using Power Bi to troubleshoot SQL Server instances
Sioux Falls, SD | Hosted by (605) SQL
Query Profiling Options in SQL Server
Building a Performance Monitoring System using XEvents and DMVs
Jean Joseph DBA\DEVELOPER
Isolation Levels Understanding Transaction Temper Tantrums
Power BI: From Zero to Hero
Using wait stats to determine why my server is slow
Advanced Database Topics
Presentation transcript:

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

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 http://Malta.Pass.Org Dennes.Torres @Dennes https://br.linkedin.com/in/dennestorres dennes@bufaloinfo.com.br http://youtube.com/c/dennestorres

Our generous sponsors

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

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

Introduction

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

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

Performance http://sqlperformance.com/2012/10/sql-trace/observer-overhead-trace-extended-events

Reading Extended Events Data Watch live data Export to Table XML Queries Automated XML Queries Real time response https://www.slideshare.net/GianlucaSartori/responding-to-extended-events-in-near-real-time

Blocked Pocess

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

Recipe Directions Event Filter Query Blocked_process_report None Usual XML sauce

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

Demo Scripts BlockedProcess and BlockedProcess2

Sort Spills

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

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

How to Serve Serve at will, no side effects

Demo Sort.sql

Deadlocks

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

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

How to Serve Serve at will, no side effects

Demo Deadlocks Deadlocks1 Deadlocks2

Log Flushes

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

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

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

Demo LogFlush LogFlushData

Improving the Recipes

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

Demo CreatingFunctions UsingFunctions

Much More

Much More Memory_Grant_Updated_By_Feedback Adaptive_join_skiped Interleaved_Execution_failed Page_Split

Even More System_Health XE session

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 http://Malta.Pass.Org Dennes.Torres @Dennes https://br.linkedin.com/in/dennestorres dennes@bufaloinfo.com.br http://youtube.com/c/dennestorres