SlideShare a Scribd company logo
Debugging made easier with extended events
C:Users>
whoami
@banerjeeamit
An affair with SQL Server for nearly a decade
Was part of SQL Escalation Services and Premier Field Engineering
team at Microsoft
Now a Sr. Program Manager on the Microsoft SQL Server (TIGER)
product team focusing on HADR and Replication
Speaker at SQL PASS, 24HOP, TechEd, Virtual TechDays, User Groups,
SQL Saturdays, SQLBITS, SQL NEXUS
Dabble around with supportability tools and have contributed to SQL
Backup Simulator SQLDIAG/PSSDIAG Manager and SQL Nexus
Co-authored “Professional SQL Server 2012: Internals and
Troubleshooting”
Own TroubleshootingSQL.com
Also found on http://aka.ms/sqlserverteam
@mssqltiger
Please USE your
cell phones
#XEventNinja
3
Debugging made easier with extended events
Debugging made easier with extended events
Debugging made easier with extended events
• Error that has a severity >=20
• Memory-related errors which include 17803, 701, 802, 8645, 8651, 8657 and 8902
• A record of any non-yielding scheduler problems
• Any deadlocks that are detected
• Sessions that have waited on latches (or other interesting resources) for > 15 seconds
• Waiting on locks for > 30 seconds
• Lon preemptive waits
• CLR allocation and virtual allocation failures
• System component results from sp_server_diagnostics
• Instance health
• CLR Allocation failures
• Connectivity errors Security errors
Debugging made easier with extended events
•
Column Description
Sql_handle Hash map of the SQL text of the request. Is nullable.
Plan_handle Hash map of the plan for SQL execution. Is nullable.
Query_hash Binary hash value calculated on the query and used to identify
queries that have similar logic. You can use the query hash to determine
the aggregate resource usage for queries that differ only by literal
values.
Query_plan_hash Binary hash value calculated on the query execution plan and used to
identify similar query execution plans. You can use the query plan hash
to find the cumulative cost of queries that have similar execution plans.
Ideal_memory_kb Ideal memory grant size in KB.
Granted_memory_kb Granted memory in KB.
Used_memory_kb Used memory in KB.
Usage_percent Used/granted memory for easy filtering.
Dop Degree of parallelism.
Granted_percent Granted/ideal memory for easy filtering.
•
Debugging made easier with extended events
•
•
Debugging made easier with extended events
Debugging made easier with extended events
recovery
recovery
recovery
backup restore
DEMO
XEvents
• Blog:
• Aka.ms/sqlserverteam
• www.troubleshootingsql.com
• Twitter:
• @banerjeeamit
• @mssqltiger
Feedback:
http://speakerscore.com/SQLBITSXEvents
Debugging made easier with extended events

More Related Content

PPTX
AlwaysOn Troubleshooting Improvements
PPTX
Always On Availability Group Troubleshooting Ninja
PPTX
Troubleshooting common scenarios with Always On - A Dress Rehearsal
PPTX
Enhancements to High Availability, Disaster Recovery and Replication
PPTX
Securing SQL Server with TLS 1.2
PPTX
You, SQL Server and PowerShell
PPTX
Slow query bring it on
PPTX
Building 1 million predictions per second using SQL-R
AlwaysOn Troubleshooting Improvements
Always On Availability Group Troubleshooting Ninja
Troubleshooting common scenarios with Always On - A Dress Rehearsal
Enhancements to High Availability, Disaster Recovery and Replication
Securing SQL Server with TLS 1.2
You, SQL Server and PowerShell
Slow query bring it on
Building 1 million predictions per second using SQL-R

What's hot (19)

PPTX
SQL Saturday 511 - Troubleshooting made easier using extended events
PPTX
SQL Server Tips and Tricks - Power
PPTX
Sql dba training&classes
PDF
New Server in an Hour #sqlsat121
PPTX
Serverless Apps
TXT
Sql3
PPT
Sql Azure - Sql Saturday Kansas City
PPTX
Sql Azure - Sql Saturday Chicago
PDF
Introduction to Asp.net 3.5 using VS 2008
PDF
Moving to the APEX Listener
PPT
Sql Azure Sql Saturday Nyc
PDF
Performance Troubleshooting made easier- New features in Management Studio
PPTX
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
PPTX
Azure functions
PPTX
PPTX
Azure functions
PDF
A Primer on Web Components in APEX
PPTX
Azure cloud for the web frontend developers
PPTX
Capture the Cloud with Azure
SQL Saturday 511 - Troubleshooting made easier using extended events
SQL Server Tips and Tricks - Power
Sql dba training&classes
New Server in an Hour #sqlsat121
Serverless Apps
Sql3
Sql Azure - Sql Saturday Kansas City
Sql Azure - Sql Saturday Chicago
Introduction to Asp.net 3.5 using VS 2008
Moving to the APEX Listener
Sql Azure Sql Saturday Nyc
Performance Troubleshooting made easier- New features in Management Studio
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
Azure functions
Azure functions
A Primer on Web Components in APEX
Azure cloud for the web frontend developers
Capture the Cloud with Azure
Ad

Similar to Debugging made easier with extended events (20)

PPTX
U-SQL - Azure Data Lake Analytics for Developers
PDF
Modernizing your database with SQL Server 2019
PPTX
Scalable relational database with SQL Azure
PPTX
Azure cosmosdb
PDF
World2016_T5_S5_SQLServerFunctionalOverview
PDF
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
PDF
Columnstore indexes in sql server 2014
PPTX
What’s new in SQL Server 2017
PPTX
Migrating on premises workload to azure sql database
PPTX
Tech-Spark: Azure SQL Databases
PPTX
Azure SQL Database
PPTX
Azure data platform overview
PPTX
Machine Learning and AI
PPTX
05_DP_300T00A_Optimize.pptx
PDF
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
PPTX
A Complete BI Solution in About an Hour!
PPTX
Azure from scratch part 3 By Girish Kalamati
PPTX
Monitorando performance no Azure SQL Database
PPTX
My sql performance tuning course
PDF
Azure SQL Database
U-SQL - Azure Data Lake Analytics for Developers
Modernizing your database with SQL Server 2019
Scalable relational database with SQL Azure
Azure cosmosdb
World2016_T5_S5_SQLServerFunctionalOverview
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Columnstore indexes in sql server 2014
What’s new in SQL Server 2017
Migrating on premises workload to azure sql database
Tech-Spark: Azure SQL Databases
Azure SQL Database
Azure data platform overview
Machine Learning and AI
05_DP_300T00A_Optimize.pptx
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
A Complete BI Solution in About an Hour!
Azure from scratch part 3 By Girish Kalamati
Monitorando performance no Azure SQL Database
My sql performance tuning course
Azure SQL Database
Ad

More from Amit Banerjee (15)

PPTX
The Roadmap for SQL Server 2019
PPTX
Azure database services for PostgreSQL and MySQL
PPTX
Upgrade your SQL Server like a Ninja
PPTX
SQL PASS 2017 - Building one million predictions per second using SQL Server ...
PPTX
Performance Demystified for SQL Server on Azure Virtual Machines
PPSX
Provisioning Azure Virtual Machines to run SQL Server
PPSX
Backup enhancements with SQL Server 2014
PPTX
Troubleshooting SQL Server using Power Pivot and Power View
PPTX
SQL Server Scheduling Basics
PPT
System health session
PPTX
Microsoft TechEd India 2012 Backup Restore
PPTX
Debugging the Deadlock for the Scheduler
PPTX
Managing SQL Server Made Easy - Features and Concepts
PPTX
Understanding performance bottlenecks using performance dashboard
PPS
Sql Nexus
The Roadmap for SQL Server 2019
Azure database services for PostgreSQL and MySQL
Upgrade your SQL Server like a Ninja
SQL PASS 2017 - Building one million predictions per second using SQL Server ...
Performance Demystified for SQL Server on Azure Virtual Machines
Provisioning Azure Virtual Machines to run SQL Server
Backup enhancements with SQL Server 2014
Troubleshooting SQL Server using Power Pivot and Power View
SQL Server Scheduling Basics
System health session
Microsoft TechEd India 2012 Backup Restore
Debugging the Deadlock for the Scheduler
Managing SQL Server Made Easy - Features and Concepts
Understanding performance bottlenecks using performance dashboard
Sql Nexus

Recently uploaded (20)

PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
What is a Computer? Input Devices /output devices
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
STKI Israel Market Study 2025 version august
observCloud-Native Containerability and monitoring.pptx
Hindi spoken digit analysis for native and non-native speakers
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Developing a website for English-speaking practice to English as a foreign la...
1 - Historical Antecedents, Social Consideration.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Getting Started with Data Integration: FME Form 101
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
What is a Computer? Input Devices /output devices
Module 1.ppt Iot fundamentals and Architecture
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
1. Introduction to Computer Programming.pptx
Getting started with AI Agents and Multi-Agent Systems
NewMind AI Weekly Chronicles – August ’25 Week III
Assigned Numbers - 2025 - Bluetooth® Document
STKI Israel Market Study 2025 version august

Debugging made easier with extended events

  • 2. C:Users> whoami @banerjeeamit An affair with SQL Server for nearly a decade Was part of SQL Escalation Services and Premier Field Engineering team at Microsoft Now a Sr. Program Manager on the Microsoft SQL Server (TIGER) product team focusing on HADR and Replication Speaker at SQL PASS, 24HOP, TechEd, Virtual TechDays, User Groups, SQL Saturdays, SQLBITS, SQL NEXUS Dabble around with supportability tools and have contributed to SQL Backup Simulator SQLDIAG/PSSDIAG Manager and SQL Nexus Co-authored “Professional SQL Server 2012: Internals and Troubleshooting” Own TroubleshootingSQL.com Also found on http://aka.ms/sqlserverteam @mssqltiger
  • 3. Please USE your cell phones #XEventNinja 3
  • 7. • Error that has a severity >=20 • Memory-related errors which include 17803, 701, 802, 8645, 8651, 8657 and 8902 • A record of any non-yielding scheduler problems • Any deadlocks that are detected • Sessions that have waited on latches (or other interesting resources) for > 15 seconds • Waiting on locks for > 30 seconds • Lon preemptive waits • CLR allocation and virtual allocation failures • System component results from sp_server_diagnostics • Instance health • CLR Allocation failures • Connectivity errors Security errors
  • 9. • Column Description Sql_handle Hash map of the SQL text of the request. Is nullable. Plan_handle Hash map of the plan for SQL execution. Is nullable. Query_hash Binary hash value calculated on the query and used to identify queries that have similar logic. You can use the query hash to determine the aggregate resource usage for queries that differ only by literal values. Query_plan_hash Binary hash value calculated on the query execution plan and used to identify similar query execution plans. You can use the query plan hash to find the cumulative cost of queries that have similar execution plans. Ideal_memory_kb Ideal memory grant size in KB. Granted_memory_kb Granted memory in KB. Used_memory_kb Used memory in KB. Usage_percent Used/granted memory for easy filtering. Dop Degree of parallelism. Granted_percent Granted/ideal memory for easy filtering.
  • 10.
  • 17. • Blog: • Aka.ms/sqlserverteam • www.troubleshootingsql.com • Twitter: • @banerjeeamit • @mssqltiger Feedback: http://speakerscore.com/SQLBITSXEvents

Editor's Notes

  • #9: More details available here: https://blogs.msdn.microsoft.com/sqlreleaseservices/sql-server-2012-service-pack-3-is-now-available/
  • #10: More information about this improvement can be found in the following articles: https://support.microsoft.com/en-us/kb/3107173
  • #11: More information about this improvement can be found in the following articles: https://blogs.msdn.microsoft.com/sql_server_team/added-per-operator-level-performance-stats-for-query-processing/
  • #13: More information about this improvement can be found in the following articles: https://blogs.msdn.microsoft.com/alwaysonpro/2016/02/23/improved-alwayson-availability-group-lease-timeout-diagnostics/ https://support.microsoft.com/en-us/kb/3112363 Refer the following for Lease Timeouts: https://blogs.msdn.microsoft.com/psssql/2012/09/07/how-it-works-sql-server-alwayson-lease-timeout/
  • #16: More details about these Xevents are available at: https://blogs.msdn.microsoft.com/sql_server_team/new-extended-event-to-track-backup-and-restore-progress/ https://blogs.msdn.microsoft.com/sql_server_team/new-extended-events-for-database-recovery-progress/