capture-with-extended-events

Installation
SKILL.md

Capture with Extended Events on Azure SQL Database

Builds a database-scoped event session, starts it, reads its target back as a rowset, and drops it. What the captured data means belongs to the diagnostic skills that consume it.

Checked 2026-09-03 against Microsoft Learn's Azure SQL Database Extended Events pages and its Database Engine error tables, and on 2026-08-29 against a local Azure SQL Database container reporting EngineEdition 5. Where the two disagree this file follows Learn, because the container is a different engine build and the subject here is the cloud service. Every disagreement is named at the point it matters.

Four things the service changes, and the error number for each

Scope Sessions are database-scoped only. ON SERVER fails with Msg 25737, and so does ON DATABASE against a system database
Names Catalog views and DMVs take a database_ prefix, never server_: sys.database_event_sessions, sys.dm_xe_database_sessions
Durable target event_file writes to an Azure Storage blob and nowhere else. A local path fails at CREATE with Msg 40538
No baseline There is no built-in system_health session in Azure SQL Database. Nothing is capturing anything until you build a session
Installs
11
GitHub Stars
23
First Seen
Sep 28, 2026