-
Notifications
You must be signed in to change notification settings - Fork 106
Detailed XEvents Tracing
Extended Events (XEvents) is the recommended mechanism for collecting SQL Server diagnostic data and is fully supported by SQL Nexus for import and analysis.
XEvents can be used to troubleshoot a wide variety of SQL Server issues. However, if your server is very active with many concurrent users, you should carefully evaluate the overhead of the events you enable. Many events fire at the statement level — meaning one event per statement executed. On high-throughput systems with cursors, scalar UDFs, or very frequent small queries, this can generate significant overhead.
Examples of higher-overhead events to use with caution:
query_pre_execution_showplanquery_post_execution_showplanquery_post_compilation_showplanlock_acquiredsql_statement_startingsql_statement_completedsp_statement_startingsp_statement_completed
Lower-overhead alternatives (fire at batch/RPC level rather than statement level):
sql_batch_completedrpc_completedsql_batch_starting
SQL Nexus automatically detects and imports the following XEL file types:
| XEL Source | File Pattern | Importer | Notes |
|---|---|---|---|
| SQL LogScout XEL | *LogScout*.xel |
ReadTrace (RML) | Covers xevent_LogScout_target*.xel and SQLLogScout_AlwaysOn_Data_Movement*.xel
|
| SQLDiag XEL | *_SQLDIAG*.xel |
CustomXELImporter | Auto-generated by SQL Server (e.g. sp_server_diagnostics on clustered servers) |
| Always On Health | *AlwaysOn_health*.xel |
CustomXELImporter | Built-in SQL Server Always On health session |
| System Health | *system_health*.xel |
CustomXELImporter | Built-in SQL Server system health session |
| PSSDIAG XEL | *pssdiag*.xel |
ReadTrace (RML) | Collected via PSSDIAG/DiagManager |
Note on SQLDiag, Always On Health, and System Health XEL imports: These three XEL file types are disabled by default to avoid inflating the size of the SQL Nexus database, as they can be very large on active systems. To enable them, open the Import window, click Options, then navigate to Importers and enable the desired XEL import options before running
SQL LogScout captures XEvent sessions
as part of several of its collection scenarios (e.g. GeneralPerf, DetailedPerf,
XEEvents). The resulting .xel files are placed in the output folder and can be
directly imported into SQL Nexus.
PSSDIAG captures active XEvent
sessions and events. A summary of the active XEvent sessions at collection time
is recorded in a file named <servername>_Profiler Traces_Startup.OUT, which
SQL Nexus imports to provide context on what was being traced.
- Prefer batch/RPC-level events over statement-level events on busy systems.
- Use predicate filters in your XEvent session to limit capture to specific databases, logins, or applications.
- Set a maximum file size and file rollover to prevent runaway disk usage.
- Consider collecting XEvents only during a known problem window rather than continuously.