Questions tagged [extended-events]
SQL Server Extended Events (Extended Events) is a general event-handling system for server systems.
186
questions
0
votes
1
answer
22
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 ...
0
votes
1
answer
18
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 [...
5
votes
1
answer
2k
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 ...
0
votes
1
answer
27
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 ...
4
votes
1
answer
140
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 ...
0
votes
1
answer
95
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 ...
-1
votes
1
answer
40
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) ...
2
votes
0
answers
37
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 ...
0
votes
0
answers
34
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 &...
1
vote
0
answers
84
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 ...
3
votes
1
answer
191
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
...
0
votes
1
answer
107
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 ...
0
votes
1
answer
63
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 ...
1
vote
1
answer
73
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 ...
0
votes
1
answer
56
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 "...
0
votes
1
answer
133
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 ...
1
vote
1
answer
27
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 ...
0
votes
1
answer
448
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 ...
0
votes
1
answer
48
views
MSSQL - How to log every rpc_completed event into a table?
I want to log the Execution Time and Parameters for every stored procedure call on my database.
What I reached by searching is to use extended events as the latest method with minimum performance ...
1
vote
1
answer
322
views
Extended Events Login audit - Reduce login noise
We are looking for the optimal sql login audit solution, with usable filtering.
Thus far we have looked into Server Audits and profiler but have concluded that extended events
look most promising, ...
0
votes
1
answer
207
views
Sql_text Data Missing When Querying Extended Event File Target Using TSQL
I set up an Extended Events session to capture SQL Server error events.
Below is the TSQL I used to create the XE session:
CREATE EVENT SESSION [ErrorCapture] ON SERVER
ADD EVENT sqlserver....
0
votes
1
answer
292
views
Performance impact of Extended Events sessions looking at the exact same event type
I have created an extended events session that watches the module_start event type and filters down based on the object_name: equal_i_sql_unicode_string]([object_name])
The purpose of this session is ...
0
votes
1
answer
12
views
What Name from Event Library?
I'm new in SQL Server's extended events and you can create your own session and select your own name in Event library.
From your experience, what name from event library have you selected in order to ...
0
votes
2
answers
363
views
extended events rpc_completed duration does not matching with rpc_starting
Does rpc_completed duration (micro_sec) = rpc_starting.timestamp - rpc_completed.timestamp?
In my case, I saw a big difference between them. Duration is only few millsec, where rpc_starting.timestamp -...
0
votes
1
answer
111
views
SQL Server Extended Events to Capture Objects access by a User [duplicate]
I am in for a requirement where I need to use EE to capture the Objects Accessed by a particular SQL User.
I want to avoid the action sqlserver.sql_text, if I use this, I will need to manually scan ...
7
votes
1
answer
803
views
How to avoid Table Lock Escalation?
I've got a task to update 5 million rows in a production table, without locking down the whole table for extended time
So, I used approach that helped me before many times - updating top (N) rows at a ...
0
votes
2
answers
82
views
Where is the documentation for SQL Server's blocked process report?
I'm trying to work with the blocked process reports captured using Extended Events and, while I can find numerous blog articles and Q&A about specific details (e.g.1 2 3), I can't find any ...
7
votes
2
answers
375
views
Automatically reject certain expensive query statements
I have some clients which sometimes run some "not allowed" very expensive queries.
I've tracked them down using Extended Events.
Is it possible to reject these queries automatically? I know ...
1
vote
1
answer
182
views
Extended Events XEL file reader; Is there a FileName property avaialble in QueryTableXEventData or SqlBulkCopy
Using the QueryTableXEventData class in Powershell I am able to parse 100's of XEL files very quickly and export their content to a table in SQL Server using SQLBulkCopy
Example:
$events = new-object ...
4
votes
1
answer
298
views
How to capture runtime parameters with extended event?
I use rpc_completed event in order to capture executed sprocs. I am also to view the statement and passed parameters by using the following way:
right-click extended event -> Watch Live Data and ...
0
votes
1
answer
404
views
How to query an Extended Events target file on a SQL Azure Managed Instance by using T-SQL?
I'm setting up an Extended Events trace in a Managed Instance (NOT Azure SQL DB) for the first time.
These are the steps I've carefully followed:
Created a Master key on my Database.
Created a ...
0
votes
2
answers
91
views
Backup Restore, CPU usage and Extended Events
I'm working on measuring the performance impact of Backups on CPU. I would like to capture all the backup operations and CPU usage. I'm running a weekly full backup, daily diff, and 15 min log backup. ...
0
votes
1
answer
257
views
SQL Server Extended event filters: can you use an IN predicate with a subquery?
I have an extended event that tracks and filters login events from specific users. The filter is something like this:
WHERE (([sqlserver].[nt_user]=N'fredJohnson') OR ([sqlserver].[nt_user]=N'...
2
votes
2
answers
330
views
Problem tracing Error: 8623 with extended events
From time to time we are getting SQL Server error:
Error: 8623, Severity: 16, State: 1
The query processor ran out of
internal resources and could not produce a query plan. This is a rare
event and ...
0
votes
1
answer
67
views
SQL extended event captured only the estimated execution plan but no actual execution plan
My SQL instance version is Microsoft SQL Server 2014 (SP3-CU-GDR) (KB4535288)
I am troubleshooting the application time-out and the time-out SELECT query is quite simple. It only takes less than 1 ...
1
vote
1
answer
266
views
Improve querying of Extended Events target file
As part of our server estate monitoring, I am adding extended events to pick up warnings, blocking etc and I'd like to periodically (Every couple of minutes) query the event file to collect the data. ...
2
votes
2
answers
231
views
Performance of Query where time captured from SP statement completed differs by large from RPC completed
I am unable to understand the performance of below query when collected data from XE events:
Query
DECLARE @Importdate DATETIME = ISNULL ((
SELECT ImportDatetime
FROM
Customertable
where CustomerID ...
-1
votes
1
answer
324
views
General Question as best practice to collect data from extended events
Hope ya all doing good and safe:-
I am collecting query level metrics from extended events using below events for -
SP statement completed
SQL Statement completed
SQL Batch Completed
RPC Completed
...
0
votes
1
answer
185
views
Specify file target filename dynamically
I need to create an Extended Event session to capture all the executed queries while my server is running and save them in a file under a folder with the database name.
DECLARE @file varchar(50);
...
1
vote
0
answers
181
views
SQL Server 2017, XEvent: sql_text IS NOT NULL
I'm attempting to use XEvents to find out which queries are causing my templog.ldf file to grow in size. I'm getting events, but I see the sizes of the files haven't changed, and that the sql_text ...
2
votes
1
answer
87
views
Error while creating Extended Events on 2008 SQL Server
I am trying to create an extended event to capture the login information of my server. While creating an extended event on SQL 2008 using the below query
CREATE EVENT SESSION [SA_Monitor] ON SERVER
...
0
votes
0
answers
298
views
SQL Server 2008: The target name, "package0.event_file", is invalid, or the object could not be found
What can cause the following error?
Msg 25623, Level 15, State 2, Line 1
The target name, "package0.event_file", is invalid, or the object could not be found
Given the following TSQL:
CREATE EVENT ...
1
vote
0
answers
2k
views
Troubleshoot MS DTC error
I've been getting these two errors on SQL Server log:
Error 1:
DESCRIPTION: Import of Microsoft Distributed Transaction
Coordinator (MS DTC) transaction failed:
0x8004d00e(...
1
vote
2
answers
72
views
Failing MERGE Statement: How to monitor with XEvents and specifically get parameter values for a prepared statement?
My problem
I am running SQL Server 2017 and would like to investigate an error with a MERGE statement like the following
MERGE INTO table
USING
(SELECT ? AS Search_Col) AS SRC
ON table....
2
votes
1
answer
90
views
Extended Events Collation resolution error
When trying to expand the sessions under extended events I am getting a Collation Resolution error in SSMS 18.2 (15.0.18142):
Looking at a trace I have found that this query is what is giving me the ...
0
votes
0
answers
67
views
create_time in sys.dm_xe_sessions is in the future
I have run the following query which shows the running XE sessions on the server:
SELECT name,
create_time
FROM sys.dm_xe_sessions
and I get the results
+-------------------------------+...
2
votes
1
answer
307
views
What is the impact of MAX_DISPATCH_LATENCY while configuring EXTENDED EVENT?
By default, MAX_DISPATCH_LATENCY is set to 30 seconds. I chose FILE as a target and write all captures there. I thought that if I write all captures into file, why would then I lower down ...
3
votes
1
answer
233
views
MSSQL Server XE column client_connection_id accessible through system view/table for auditing?
In our .NET application we create a SqlConnection to talk to the database.
After the connection is opened, we get the ClientConnectionId, a GUID.
Within the extended events I can manage to trace the ...
1
vote
1
answer
520
views
SQL Server Extended Events purging
How do we purge events older than a day in Extended Events in SQL Server 2012. Stopping and Starting the session is not helping.
Target : asynchronous_file_target
Trying to create a job which will ...
1
vote
2
answers
208
views
Querying system health data becomes slow as event volume increases
We get the data from system health XE from SQL server and load into table for later querying.
Part of that statements which gets pretty slow is
INSERT INTO TABLE1
(
[object_name]
...