Questions tagged [extended-events]

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.

111 questions
0
votes
1 answer

SQL query executes in C# but it does not return any result

I need to execute my SQL Server xevent creation with my C# and starting it then read its content from file. The query executes fine and no errors are displayed however the session is not added in SQL Server so no results are returned. I executed the…
0
votes
1 answer

Start SQL Server extended event session using c#

I need to start a SQL Server extended event session through my C# code. I have this code to create a session and then to execute it, but it is not working, any help please? Code : SQL statements to create a session string sql = "DECLARE @file…
0
votes
1 answer

xevent trace doesn't return anything in SQL Server 2019

I'm trying to watch trace events on SQL Server 2019 and created an Extended Events session like this: CREATE EVENT SESSION [test] ON SERVER ADD EVENT sqlsni.trace WITH (MAX_MEMORY=4096…
0
votes
1 answer

Extended events capture bare minimum events for better performance

We are having legacy application, where there are so many users connecting to our legacy system. We know about our jobs and our DB maintenance activities. But, we see so many different users also accessing the production system. We want to capture…
0
votes
0 answers

Question about Extended events - lock_acquired and lock_released

I'm trying to create EE session that will track lock_acquired and lock_released events for specific object Here is definition of EE session CREATE EVENT SESSION [Locks acquired] ON SERVER ADD EVENT sqlserver.lock_acquired(SET…
Alexandr
  • 25
  • 7
0
votes
0 answers

C# & SQL Server realtime DML events

I have a requirement to generate DML events (insert, update, delete) from SQL Server to an external entity. I have tried implementing extended events using the Microsoft.SqlServer.XEvent.XELite nuget package. But it does not provide the row data,…
Babu James
  • 2,740
  • 4
  • 33
  • 50
0
votes
1 answer

SQL Server Extended Events module_start missing NestLevel info

Is there a way when tracing using Extended events in SQL Server to display Nested Level of nested procedure? Deprecated Profiler has a column named NestLevel for SP:Starting which can nicely describe the hierarchy of nested procedures. But I could…
Janka P
  • 57
  • 1
  • 5
0
votes
1 answer

How to Optimize extended event to JSON conversion

I have a small process for ingesting a .xel file, converting it to custom objects with a dba-tools module, and then turning them into single-line JSON and exporting them to a file that gets sent off to wherever it goes. Here: $path =…
Ben Adams
  • 129
  • 1
  • 2
  • 11
0
votes
1 answer

Extended event can not collect Schema Name

I have set up an extended event to capture "sp_statement_completed" events, the script to create it is below. CREATE EVENT SESSION [t1] ON SERVER ADD EVENT sqlserver.sp_statement_completedADD TARGET package0.event_file(SET…
0
votes
1 answer

ADO.NET query not showing in XEvents

I sent a query to SQL Server using an ADO.Net SqlAdapter from PowerShell. The query returns the correct result. When I run an XEvent session with the sqlserver.sql_statement_starting event, the query from ADO.NET does not show up. Queries I sent…
Ben
  • 137
  • 1
  • 7
0
votes
1 answer

Reading XEL (SQL Server eXtended Event file) by log collectors such as filebeats or nxlog

I want to create a centralized log with graylog and log collectors such as filebeats or nxlogs. I know Microsoft SQL Server extended events creates .XEL files. but they are binary files. Is there any clean way to read this xel files by filebeats or…
Arash Mousavi
  • 2,110
  • 4
  • 25
  • 47
0
votes
1 answer

SQL Query XML for Extended Events system table for Session object (not data file) in predicate_XML field

I am querying the system tables for Extended Events in SQL to get some data about the extended event itself, and I want to get the database that is set in the Extended Events when its created. if I run this query from system tables here: SELECT…
Brad
  • 3,454
  • 3
  • 27
  • 50
0
votes
1 answer

SQL Server: Is it possible to log errors of statements or a transactions using Extended Events?

I'm logging many things via Extended Events. I saw the error_reported or errorlog_written is very generic and logs a lot of errors. With Extended Events, is it possible to get an SQL transaction or statement error? I'd like to get the log using…
felipe
  • 1,212
  • 1
  • 15
  • 27
0
votes
1 answer

Is it possible to work with extended events (Sql server Extended events ) in Java code?

I have one question. Can I work with extended events in Java code? Run sessions and analyze results. Is there a specific api or interface to do this?
0
votes
1 answer

How to read extended events through the .net code

I had this requirement to log and read the extended events , I did achieve this through the Xpath queries and it worked as expected . Sometime has passed and now the .xel file has grown in size and the Xpath query takes long time to give back the…
Manjunath
  • 323
  • 1
  • 3
  • 15