This module modernizes an older “Profiler / Trace Wizard” workflow into the current SQL Server troubleshooting model: Extended Events (XE) for targeted diagnostics, and Query Store for persistent performance history and regression analysis. Profiler-era traces were useful, but they introduced avoidable overhead and required you to "catch the problem live." In SQL Server 2025, the recommended approach is to keep Query Store collecting baselines while you use XE sessions as lightweight, purpose-built captures when you need deeper visibility.
Extended Events is built around a small set of composable concepts:
sql_batch_completed, rpc_completed, error_reported).WHERE clause in the session definition).event_file for durable storage, or ring_buffer for short live troubleshooting).
In practice, an XE session is defined with CREATE EVENT SESSION, one or more ADD EVENT blocks, one or more ADD TARGET blocks, and optional session settings in the WITH (...) clause
(for example: dispatch latency, retention behavior, memory partitioning, startup state, and causality tracking).
If you are upgrading older course material (or migrating a legacy trace workflow), Microsoft publishes a mapping
that helps you translate SQL Trace “event classes” to their Extended Events equivalents.
For example, Profiler’s “RPC:Completed” maps to the XE event sqlserver.rpc_completed, and “SQL:BatchCompleted” maps to sqlserver.sql_batch_completed. Use that mapping as your starting point, then refine your session with
predicates and only the actions you actually need.
| Legacy (SQL Trace / Profiler) | Extended Events (XE) equivalent | Why you still care |
|---|---|---|
| RPC:Completed | sqlserver.rpc_completed |
Track stored procedure execution costs and durations. |
| SQL:BatchCompleted | sqlserver.sql_batch_completed |
Track ad-hoc batch execution and high-cost batches. |
| Deadlock graph | sqlserver.xml_deadlock_report |
Capture the deadlock graph for root-cause analysis. |
Query Store complements XE by continuously collecting query text, plans, and runtime statistics inside the database, enabling trend analysis and fast regression detection. Instead of replaying a captured trace workload, administrators use Query Store’s built-in reports (such as “Regressed Queries” and “Top Resource Consuming Queries”) to identify which plan change caused a slowdown, then stabilize performance using plan forcing or other Query Store-driven tuning options.
event_file) and short investigations (often ring_buffer).event_file, ring_buffer).In the next module, you will expand monitoring beyond SQL Server internals and incorporate operating system and platform-level telemetry so you can separate “database engine problems” from CPU, memory, storage, and network constraints.