SQL Server Extended Events (Extended Events) is a general event-handling system for server systems. The Extended Events infrastructure supports the correlation of data from SQL Server, and under certain conditions, the correlation of data from the operating system and database applications. The SQL Server Extended Events Engine was first introduced in SQL Server 2008 and was greatly enhanced in SQL Server 2012.
Questions tagged [extended-events]
111 questions
0
votes
0 answers
Understand login logout events on SQL Server extended events after upgrading compatibility level
After upgrading the compatibility level of our SQL Server to 150, we're facing some random issues getting the SCOPE_IDENTITY after an INSERT. To find the issue, we create an event session like this :
CREATE EVENT SESSION [QuickSessionTSQL] ON SERVER…

ElRoro
- 203
- 1
- 13
0
votes
1 answer
Extended event to capture which is running view in SQL Server
I have a requirement to capture which users are hitting a view in a database. My initial thought was to use extended events but for some reason when I test nothing is being captured.
This is what I have so far. Any suggestion would be greatly…

dan Kalio
- 33
- 4
0
votes
0 answers
What events should I choose to track GRANT, REVOKE statements in Extended Events Session?
I didn't find any event that corresponds to tracking GRANT, REVOKE
I tried object_altered, object_deleted, object_created with no luck.

Дмитрий
- 1
0
votes
1 answer
PowerShell Sql Server Extended Events xml query value in between tags
Given this sample xml, can anyone help me read the inputbuf?
some random string like this
…

beehive
- 93
- 3
- 11
0
votes
1 answer
Extended Events for Server/Database Audit
I am wanting to know if anyone is aware if there is an Extended Event I could utilize to detect if a SQL server/database audit definition has been altered, created, deleted, etc.
Currently I am utilizing SQL server/database audits, but am being…

Pushpin29
- 21
- 3
0
votes
1 answer
count of all records stored Extended Event
I want to get count of all records stored in Extended Event but that file is a huge and running a query on it takes several minutes and does not meet my need.
I wanted to know is there any place in the sql server to get this data there? I mean…

Mohammad Safyar
- 35
- 8
0
votes
0 answers
Cannot create event session - SQL Server extended events
I'm trying to automate extended events logger for a few SQL Servers. I have a template SQL script which should create event session.
CREATE EVENT SESSION [sql-queries-test] ON SERVER
ADD EVENT sqlserver.sql_batch_completed(SET…

Wilq
- 1
- 1
0
votes
0 answers
Restore Extended Events files from multiple directories
Here's a problem:
I restore extended events every day. The folders structure look like:
1) ServerName_20210102 -> extended files
2) ServerName_20210103 -> extended files
3) ServerName_20210104 -> extended files
And I want to restore Extended Events…

Kirill
- 11
- 3
0
votes
0 answers
Why extended event doesn't trace SQL text when using app but sql profiler does
In order to trace my actions on app I am using sql profiler.
Works fine, I am connecting to the server, filtering on host name, and everting what I click on app will be reflected as sql code in profiler.
But when I try to achieve the same using…

Serdia
- 4,242
- 22
- 86
- 159
0
votes
2 answers
Capture and react to a Session Close event in SQL Server?
I need a way to know when a session closes in SQL Server so I can clean up any resources allocated for that session by running a stored procedure I have.
When things are running perfectly, the client app would call a Cleanup routine to do this. But…

Thomas Oatman
- 301
- 2
- 9
0
votes
1 answer
How to use extended events to track tables used in stored procedures being run
How do I use extended events (SQL Server 2012) to tell me when certain tables are used in stored procedures. I want to drop some tables and so I want to know if the stored procedures the use those tables are actually being run.
The code sample sets…

Craig
- 4,111
- 9
- 39
- 49
0
votes
0 answers
In SQL Server why does a SET statement show up in sp_cache_miss extended events? And could it be causing high CPU?
Our production server has rather high CPU and I wondered if a possible cause is a high rate of compilations on the server.
There's about 5000 SQL compilations/sec (with a compilation to batch request percentage of about 30%).
In contrast there's…

bluekangaroo
- 1
- 1
0
votes
1 answer
Extended events and linked server calls received
I've figured out how to use extended events (xe) to capture queries using a linked server call. I'm curious to know if xe can be used on a reporting server to capture queries coming from a linked server query or call?
We have a reporting server…

John Waclawski
- 936
- 1
- 11
- 20
0
votes
1 answer
Deadlock graph from Extended Events not showing
I have this query which is from "Sql Server 2017 Query Performance Tuning"(a book). Code for the book can be found here: https://github.com/Apress/sql-server-2017-query-perf-tuning
DECLARE @path NVARCHAR(260)
--to retrieve the local path of…

xhr489
- 1,957
- 13
- 39
0
votes
2 answers
Extended Events connection_id vs client_connection_id
Hello guys I want to find a way to identify a query executed for Extended Events in Microsoft SQL Server (to filter the Extended Event with only that executed query)
If i query the system views in SQL Server like this:
SELECT session_id,…
user8554358