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

What's hot (20)

PPTX
SQL Saturday 511 - Troubleshooting made easier using extended events
Amit Banerjee
 
PPTX
SQL Server Tips and Tricks - Power
Amit Banerjee
 
PPTX
Sql dba training&classes
sssql
 
PDF
New Server in an Hour #sqlsat121
Mike Hillwig
 
PPTX
Serverless Apps
joehack3r
 
PDF
Performance Tuning Azure SQL Database
Grant Fritchey
 
PPTX
The Importance of Wait Statistics in SQL Server
Grant Fritchey
 
TXT
Sql3
sssql
 
PPT
Sql Azure - Sql Saturday Kansas City
Aaron King
 
PPTX
Sql Azure - Sql Saturday Chicago
Aaron King
 
PDF
Introduction to Asp.net 3.5 using VS 2008
maddinapudi
 
PDF
Moving to the APEX Listener
Dimitri Gielis
 
PPT
Sql Azure Sql Saturday Nyc
Aaron King
 
PDF
Performance Troubleshooting made easier- New features in Management Studio
Taiob Ali
 
PPTX
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
Sencha
 
PPTX
Azure functions
EducationTamil
 
PPTX
One ASP.NET
Lohith Goudagere Nagaraj
 
PPTX
Azure functions
vivek p s
 
PDF
A Primer on Web Components in APEX
Dimitri Gielis
 
PPTX
Azure cloud for the web frontend developers
Maxim Salnikov
 
SQL Saturday 511 - Troubleshooting made easier using extended events
Amit Banerjee
 
SQL Server Tips and Tricks - Power
Amit Banerjee
 
Sql dba training&classes
sssql
 
New Server in an Hour #sqlsat121
Mike Hillwig
 
Serverless Apps
joehack3r
 
Performance Tuning Azure SQL Database
Grant Fritchey
 
The Importance of Wait Statistics in SQL Server
Grant Fritchey
 
Sql3
sssql
 
Sql Azure - Sql Saturday Kansas City
Aaron King
 
Sql Azure - Sql Saturday Chicago
Aaron King
 
Introduction to Asp.net 3.5 using VS 2008
maddinapudi
 
Moving to the APEX Listener
Dimitri Gielis
 
Sql Azure Sql Saturday Nyc
Aaron King
 
Performance Troubleshooting made easier- New features in Management Studio
Taiob Ali
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
Sencha
 
Azure functions
EducationTamil
 
Azure functions
vivek p s
 
A Primer on Web Components in APEX
Dimitri Gielis
 
Azure cloud for the web frontend developers
Maxim Salnikov
 

Similar to Debugging made easier with extended events (20)

PPT
System health session
Amit Banerjee
 
PDF
Practical SQL query monitoring and optimization
Ivo Andreev
 
PDF
SQL Server Performance Analysis
Eduardo Castro
 
PDF
Ajuste (tuning) del rendimiento de SQL Server 2008
Eduardo Castro
 
PPTX
PASS VC: SQL Server Performance Monitoring and Baselining
PARIKSHIT SAVJANI
 
PDF
Sherlock holmes for dba’s
Kellyn Pot'Vin-Gorman
 
PDF
SQL Server 2014 Monitoring and Profiling
Abouzar Noori
 
PPTX
Common SQL Performance Issues
William Forney
 
PDF
SQL Server 2019 ctp2.2
Gianluca Hotz
 
PPT
Ms sql server architecture
Ajeet Singh
 
PPTX
Sql server enterprise edition awareness
Hamid J. Fard
 
PPTX
Windows azure sql database & your data
Brisebois
 
PDF
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (24 Hou...
Cathrine Wilhelmsen
 
PPTX
Denis Reznik "True SQL Server Detective"
Fwdays
 
PPTX
Perfmon And Profiler 101
Quest Software
 
PPTX
How to think like the engine
Radityo Prasetianto Wibowo
 
PPTX
Introduction to SQL Server Internals: How to Think Like the Engine
Brent Ozar
 
PDF
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
PPTX
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Bob Ward
 
PDF
The two faces of sql parameter sniffing
Ivo Andreev
 
System health session
Amit Banerjee
 
Practical SQL query monitoring and optimization
Ivo Andreev
 
SQL Server Performance Analysis
Eduardo Castro
 
Ajuste (tuning) del rendimiento de SQL Server 2008
Eduardo Castro
 
PASS VC: SQL Server Performance Monitoring and Baselining
PARIKSHIT SAVJANI
 
Sherlock holmes for dba’s
Kellyn Pot'Vin-Gorman
 
SQL Server 2014 Monitoring and Profiling
Abouzar Noori
 
Common SQL Performance Issues
William Forney
 
SQL Server 2019 ctp2.2
Gianluca Hotz
 
Ms sql server architecture
Ajeet Singh
 
Sql server enterprise edition awareness
Hamid J. Fard
 
Windows azure sql database & your data
Brisebois
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (24 Hou...
Cathrine Wilhelmsen
 
Denis Reznik "True SQL Server Detective"
Fwdays
 
Perfmon And Profiler 101
Quest Software
 
How to think like the engine
Radityo Prasetianto Wibowo
 
Introduction to SQL Server Internals: How to Think Like the Engine
Brent Ozar
 
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Bob Ward
 
The two faces of sql parameter sniffing
Ivo Andreev
 
Ad

More from Amit Banerjee (14)

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

Recently uploaded (20)

PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Learn Computer Forensics, Second Edition
AnuraShantha7
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Learn Computer Forensics, Second Edition
AnuraShantha7
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 

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/