Extended Events

functional

List Extended Events sessions with running state and per-session detail; start and stop are script-first.

Two grids side by side: the left lists the sessions with their startup state and whether each is currently running; select one and Show Events & Targets fills the right grid with that session's events and targets. Starting and stopping a session is script-first: Script Start and Script Stop open the exact ALTER EVENT SESSION … STATE = START|STOP statement in a tab for review rather than firing from the dialog - the footer says as much.

Scope-aware. Opened from a database, it lists that database's own database-scoped sessions (sys.database_event_sessions). Opened from the command palette, it lists the instance's server-scoped sessions, and on Azure SQL Database, which only has database-scoped sessions, it falls back to those automatically.
SQLly
SQLly Extended Events pane
Extended Events: the session list with running state, per-session event/target detail, and script-first start/stop.

Opening it

  • For one database: right-click the database in the explorer and choose Tools › Extended Events.... SQLly makes that database active first. The dialog title ends in (database scope).
  • For the whole instance: run Extended Events... from the command palette. The title ends in (server scope). If the server-scoped catalog cannot be read, as on Azure SQL Database - the pane retries in database scope and the title says so.

Checking a session and stopping it

Say a colleague left a tracing session running and you want to confirm what it captures before turning it off:

  1. Open Extended Events. The left grid lists every session by name with startup_state (whether it starts with the server) and is_running (1 when it is active right now).
  2. Select the session's row and press Show Events & Targets. The right grid, headed Events and targets - <session>, lists event_name and target_name pairs, such as sql_batch_completed written to an event_file target.
  3. Press Script Stop. The dialog closes and a query tab opens with the statement, which you review and run yourself:
ALTER EVENT SESSION [long_running_queries] ON SERVER STATE = STOP;

From a database the statement says ON DATABASE instead. Script Start produces the same statement with STATE = START. Session names are bracket-quoted with any ] doubled, so unusual names are safe.

Buttons

ButtonWhat it does
RefreshRe-reads the session list and clears the detail grid.
Show Events & TargetsLoads the selected session's events and targets into the right grid.
Script Start / Script StopOpens the ALTER EVENT SESSION statement for the selected session in a new query tab. Nothing runs from the dialog.

With no row selected, the actions tell you to select a session first rather than guessing.

Permissions and limits

  • Reading Extended Events metadata needs VIEW SERVER STATE, or VIEW DATABASE STATE on Azure SQL. If the list cannot be read, the pane shows the server's error with that reminder.
  • The pane lists sessions and their configuration; it does not create sessions or read captured event data. Write CREATE EVENT SESSION in a query tab, and read targets with the usual functions such as sys.fn_xe_file_target_read_file.

SQL Server family, Extended Events is a SQL Server feature. On other engines the menu item says so; on ClickHouse it points you at system.query_log and system.trace_log, which Query Insights already reads.