Questions tagged [extended-events]

SQL Server Extended Events (Extended Events) is a general event-handling system for server systems.

Filter by
Sorted by
Tagged with
-4 votes
2 answers
110 views

Why Prefer Extended Events to sp_WhoIsActive and Query Store?

If I want to find out what is happening right now, then I use Adam Machanic's sp_whoisactive. If I want to find out what has happened on my server recently, then I will use Query Store. Extended ...
J. Mini's user avatar
  • 93
0 votes
0 answers
67 views

TraceFlag 15097

I wanna use traceflag 15097 and benefit from AVX-512 on SQL Server 2022. I saw some videos where they demonstrated the feature, however I didn’t find out how to use the extended events to monitor ...
nojetlag's user avatar
  • 2,877
-3 votes
1 answer
48 views

How does the XE predicate work out the AND OR without any brackets?

I have the following XE predicate examples: Sample 1: Duration>1000000 AND cputime>1000 OR logicalreads>25000 Sample 2: Duration>1000000 OR cputime>1000 AND logicalreads>25000 I ...
variable's user avatar
  • 3,561
1 vote
2 answers
54 views

Is there any way to link "starting" and "completed" events?

In SQL Server Extended Events, is there any way of linking a "starting" event, such as rpc_starting, with a "completed" event, such as rpc_completed? For example, is there ...
Simon Elms's user avatar
0 votes
1 answer
48 views

How do you correlate SQL Database Audit spec's log column transaction_id with a LSN? from trans log or CDC capture table?

How do you correlate SQL Database Audit log column "transaction_id" with a LSN either from the trans log or a CDC capture table? I am trying to do this because cdc only captures the data ...
Joe Papp's user avatar
0 votes
1 answer
100 views

SQL Server Extended Event Session for Attention is missing field sql_text

I have an extended event session set up to track Attention events, to monitor procedures that timed out. This is the create script: CREATE EVENT SESSION [ApplicationTimeout3] ON SERVER ADD EVENT ...
Sylvia's user avatar
  • 193
1 vote
1 answer
77 views

Ring Buffer Rollover?

I'm currently using the ring buffer in extended events to track deadlocks, but noticed that it stops being queryable after it hits the memory limit. When I've used the event_file option in the past I ...
Kevin Pope's user avatar
-2 votes
1 answer
45 views

Why force plan is not working with failure "NO_PLAN"?

We have query which is inserting data to heap: INSERT INTO [heap] ( 80 COLUMNS... ) SELECT 14 columns 65 NULL VALUES , '...
adam.g's user avatar
  • 345
-1 votes
2 answers
99 views

Extended events query in User Database

I've been looking at query store results for a user database for a membership system. Performance has been poor with a number of queries timing out and showing inconsistent behavior. This is a brand ...
Sir Swears-a-lot's user avatar
0 votes
0 answers
9 views

Understanding SQL Server Extended Events: Clarification on "count" Column in "database_transaction_begin" Event

I'm currently working with SQL Server Extended Events and have come across an area I'm finding a bit unclear. I'm trying to understand the various event properties, particularly focusing on the "...
Fajela Tajkiya's user avatar
0 votes
2 answers
146 views

Use extended events to track autoupdate statistics on a specific table

I'm trying to find a way to track a table that has auto update statistics on, I'm trying to track how often it auto updates and at what intervals. The table in question is used quite often and because ...
Golosie Emanuel's user avatar
1 vote
1 answer
325 views

Capturing Blocked Process Report via Extended Events

I ran the following commands to setup extended event captures for blocked processes: CREATE EVENT SESSION [blocked_process] ON SERVER ADD EVENT sqlserver.blocked_process_report( ACTION(sqlserver....
Aheho's user avatar
  • 141
0 votes
0 answers
32 views

Extended Events - is that a proof that the issue is not at the SQL Server side?

I have a problem with one PowerBI dashboard and I would like to ask for your advise if my logic is correct. We are migrating a few databases from one server (Server1) to the another one (Server2). At ...
Radek Gąska's user avatar
1 vote
1 answer
62 views

Understanding "Mode" Parameter and Finding Documentation for Event Properties in SQL Server

I'm working with an extended event session in SQL Server and encountered a part of the T-SQL code that I don't fully understand. Specifically, I'm puzzled by the use of "Mode = 3 OR Mode = 4"...
Fajela Tajkiya's user avatar
2 votes
3 answers
432 views

Trace what is calling a trigger? Extended Events Question

Good morning all - I have a monitoring software that is showing one of my audit triggers is firing 1+ million times an hour, when I look at the audit tables there are about 3000 records entered - The ...
user1910240's user avatar
1 vote
1 answer
497 views

How to correctly set max_file_size for a file target of an extended event session?

I tried the following code to create an extended event session. CREATE EVENT SESSION xetest ON SERVER ADD EVENT rpc_completed ADD TARGET package0.event_file (SET filename = N'result.xel', ...
Fajela Tajkiya's user avatar
-1 votes
1 answer
29 views

Differences between sys.server_event_* and sys.dm_xe_* when querying SQL Server extended event meta data?

I'm querying SQL Server extended event meta data and I noticed that there are two sets of sources: sys.server_event_* and sys.dm_xe_*. What are the differences between these two sources? Which one ...
Fajela Tajkiya's user avatar
2 votes
1 answer
302 views

Stored procedure times out despite very low cpu_time and logical reads/writes

I'm developing a service locally that uses SQL Server Express as a database. I'm seeing strange behavior where a stored procedure is executing several times in a row (with different parameters), and ...
Bob Meyers's user avatar
11 votes
1 answer
472 views

Why does sys.fn_xe_file_target_read_file require an explicit cast on datetime2 column?

According to the documentation the returned column timestamp_utc should be of type datetime2(7) But when I query like this SELECT * FROM sys.fn_xe_file_target_read_file('system_health*.xel', null,...
Zikato's user avatar
  • 4,468
1 vote
1 answer
296 views

What events should I use in an Extended Event session in order to capture all executed SQL?

I want to capture all and everything running in my SQL Server instance. That include stored procedures executions, adhoc SQL query, batches etc. What events should I use in an Extended Event session? ...
Fajela Tajkiya's user avatar
0 votes
1 answer
98 views

Extended Events for Enable Disable Trigger

We have a table that has a trigger defined on it Sometimes, some application runs disable trigger command, then does something, then runs enable trigger to enable it back Scanning the GIT, developers ...
Aleksey Vitsko's user avatar
4 votes
1 answer
145 views

Official Source of What Time Zone an XEvent is Logged

I'm trying to prove that extended events (hence audits as well) are logged in UTC time zone and can't be changed but I can't find an official source. I've searched Microsoft's pages and SQL Server ...
halid.sert's user avatar
4 votes
1 answer
990 views

Identifying wait_resource for wait_info Extended Events

Is there a way to identify what type/name of resource that is being waited on?
JieLong's user avatar
  • 167
8 votes
4 answers
698 views

Return Variable Number Of Attributes From XML As Comma Separated Values

over-extended In SQL Server Extended Events for the blocked process report and deadlock XML, it's possible to get multiple SQL Handle values back to identify queries involved in the raised event. ...
Erik Darling's user avatar
  • 40.6k
0 votes
0 answers
33 views

Monitoring MS Dynamics 365 with Extended Events

I know that SQL Server and Azure SQL support "Extended Events" as a means of profiling execution. I also know that MS Dynamics 365 is built with Azure SQL. What I'd like to accomplish is ...
Brent Arias's user avatar
2 votes
1 answer
66 views

What is the extended events equivalent of the default sys trace security audit events?

I am exploring the default sys trace and it contains various records for the security changes on the SQL server (event record examples are shown in screenshot below). Since the trace feature can be ...
variable's user avatar
  • 3,561
2 votes
1 answer
216 views

A way to filter out parseonly statements from extended events?

I'm currently using extended events to capture query statements executed in a production environment. But the actual session is also capturing the activity of 'query parsing' done by operators to ...
MBuschi's user avatar
  • 4,440
5 votes
1 answer
556 views

Use square brackets on extended events filter

I want create an extended events session and use the like_i_sql_unicode_string operator to filter the phrase [demo], with the square brackets. I've started with: CREATE EVENT SESSION [demo] ON SERVER ...
Jorge Bugal's user avatar
-2 votes
1 answer
184 views

Why only few SQL Server Extended event plan handle 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

We have created an extended event to capture long running queries , the objective is to get execution plan by joining on plan handle column some event data has a plan handle with id value however some ...
chandan kumar's user avatar
1 vote
1 answer
577 views

Extended Events - How to capture executions for a given stored procedure along with the passed parameter values? [duplicate]

How do you capture executions for a given stored procedure along with the passed parameter values? I tried using sqlserver.module_end but it only shows the store proc execution with no param values: ...
user2368632's user avatar
  • 1,087
8 votes
1 answer
502 views

What can I add to an Extended Event to return correct row_counts?

I'm running an Extended Event session in SQL Server 2017 that's only recording module_end events for a specific database. The reason for this trace is two-fold: I'm wanting to see the frequency (or ...
Siyual's user avatar
  • 181
1 vote
1 answer
335 views

How to filter extended event session by sp execution time (seconds)?

Trying to view all executions of a named stored procedure where execution time exceeds a given number of seconds. How do you filter on execution time (seconds)? This is what I have cobbled together ...
user2368632's user avatar
  • 1,087
0 votes
1 answer
250 views

SQL Server Extended Events odd behavior trying to capture statements coming from SAS

The problem: the Extended Events (EE) session we created to capture queries against a certain table is not working when the request comes from SAS. The EE code: CREATE EVENT SESSION [...
Nate H's user avatar
  • 31
8 votes
1 answer
5k views

Using an extended event to track a single stored procedure

I'm attempting to track all executions of a stored procedure (Including from inside other stored procedures) and the statements of that procedure - is this possible with extended events? My current ...
Oliver Armitage's user avatar
0 votes
1 answer
80 views

XE ucs package events

Can anybody explain for what purposes exists ucs package {C0AB75C5-B1EA-445B-B7DF-F897686F94E7} "Extended events for Unified Communications Stack" I have tried to catch some events like ...
solovyevuv's user avatar
4 votes
1 answer
1k views

Extended events capture all calls by login/user and sql text containing a value

I'm using below extended events session to capture the data that contains a value 9999 by login xEventsTest. But I don't see any data captured with the filters added, but I could see this call when no ...
S.D.'s user avatar
  • 746
0 votes
1 answer
828 views

Loading Extended Events ring buffer to SQL table using powershell

I am running a RPC_Completed extended event which outputs to a ring buffer. While trying to read the data from the ring buffer target data, xQuery is taking too much of time. The faster route was to ...
Mobious's user avatar
  • 11
-1 votes
1 answer
415 views

Best method for isolating long running locks?

On a SaaS production database with 7 users (5 human, 2 backend) many are experiencing SQL cliënt timeouts at 30 seconds, our standard .Net CommandTimeout. This SQL Server instance (out of our ten) ...
Nick's user avatar
  • 59
1 vote
0 answers
52 views

Extended Event Failing To Capture Intent Locks

I have a SQL server with many unused databases and followed the linked article to set up an extended event to track intent locks and identify which DB's are actively being used, and which aren't and ...
William's user avatar
  • 141
0 votes
0 answers
97 views

sqlos.process_killed and sqlserver.lock_released Extended events not firing on SQL 2019 Enterprise

I have the following extended event sessions configured (among others). It seems that all events fire except these two. In the second session, the "lock_acquired" fires just fine, but the &...
Alexey Aksyonenko's user avatar
1 vote
0 answers
266 views

Extended events error in Azure Managed instance

I have setup extended events on Managed instance. Below are the steps followed: create a master key Create a credential for Azure Blob storage with shared access token Create the extended event and ...
SQL_yogi's user avatar
3 votes
1 answer
1k views

How to convert a query hash to uint64?

How do I convert the query hash string "0x9F37D9B585242D49" to a uint64 needed by my extended event filter? Casting to bigint doesn't work as the value goes negative. event ...
user2368632's user avatar
  • 1,087
0 votes
1 answer
599 views

How to capture the exact SQL text involved in deadlock (locks) using extended events?

I have setup extended event session with the following event: xml_deadlock_report When I look at the deadlock graph, it shows me the processes asking or requesting for the resource, and the type of ...
variable's user avatar
  • 3,561
0 votes
1 answer
431 views

Do trace flags 1204 and 1222 give any more information than available via the xml_deadlock_report event in Extended Events?

I am exploring deadlock detection approaches. Trace flags 1204 and 1222 Extended events (xml_deadlock_report) Do the trace flags contain any more data than what is available via the Extended Events ...
variable's user avatar
  • 3,561
1 vote
1 answer
259 views

How to easily copy SQL Statements from multiple extended events like I used to do in SQL Profiler?

One thing I miss from using SQL Profiler is selecting multiple rows in profiler (looking at Batch Completed and RPC Completed events) and seeing all the SQL in the below panel, i.e. as one combined ...
Rory's user avatar
  • 1,300
0 votes
1 answer
200 views

XE process_login_finish

Can anybody explain the purpose for process_login_finish extended event? I trying to catch some events for XE session with this event, but no one messages arrives to the session. However event "...
solovyevuv's user avatar
2 votes
1 answer
532 views

Azure SQL Database - Error Starting Extended Events Session

I'm using workloadtools to try and capture a production extended events "replay trace" and have hit a problem. The tool is creating the extended events session but is unable to start it for ...
Stephen Morris - Mo64's user avatar
1 vote
1 answer
268 views

how to find the error description for the error codes found in the extended events file XEL generated by SSAS Tabular query end event

how can I translate the error codes logged into XEL files to the corresponding description? I'm importing the XEL files to a SQL Table using the sys.fn_xe_file_target_read_file function, but the ...
sergiom's user avatar
  • 159
2 votes
2 answers
1k views

SQL Server, how to log client PID of failed login attempts?

I'm trying to figure out which process is trying to connect to my SQL Server instance with a wrong password. The log file only contains the IP address from where the connection is initiated. Example: ...
SparedWhisle's user avatar
1 vote
1 answer
2k views

Updating a SQL Server Extended Event session to add data storage - is it possible?

I have an extended event session to track deadlocks, and have the data storage set up for Event_File, max file size of 20 MB, max number of files is 5, enable file rollover is true. It looks like I ...
Sylvia's user avatar
  • 193

1
2 3 4 5