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
20
votes
1 answer

Capture passed parameter values in SQL Server extended sessions?

I've set up SQL Server extended events to catch the last 1000 failed queries in a specific database into a ring buffer: Create Event Session [Errors] on Server Add Event sqlserver.error_reported ( Action( sqlos.task_time, …
Herb Caudill
  • 50,043
  • 39
  • 124
  • 173
9
votes
5 answers

SQL Server 2008 - Capturing all SQL Statements Hitting the Server

Can anyone suggest options we might have in capturing all SQL statements being sent to our SQL Server, outside of running Profiler? I'm aware of a couple ways of doing it, but want to make sure I'm not overlooking something, such as an existing DM…
Randy Minder
  • 47,200
  • 49
  • 204
  • 358
8
votes
5 answers

How to clear SQL Server Extended Events Event File

How to clear SQL Server extended events that are stored in a file? Background Where are the files for SQL Server Extended Events Event File target stored? I want to delete months worth of log files; but SQL Server doesn't tell me where the files…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
8
votes
5 answers

Create Trigger to log SQL that affected table?

I'm trying to find out what is updating the value of a column and i have very little knowledge of the application. At a quick glance I've noticed about 90% of the applications business logic is handled on the database. Needless to say the depth of…
Brian
  • 4,974
  • 2
  • 28
  • 30
8
votes
1 answer

How to get owner and locked object from locks_lock_timeouts_greater_than_0 event in SQL Server?

I am capturing locks_lock_timeouts_greater_than_0 events using Extended Events in SQL Server. The event session is following: CREATE EVENT SESSION MyQuery ON SERVER ADD EVENT sqlserver.locks_lock_timeouts_greater_than_0 ( ACTION…
TN.
  • 18,874
  • 30
  • 99
  • 157
6
votes
1 answer

Connection Logging

I want SQL Server to create a log file recording of all (successful) logins/connections to the database. The log should contain minimally: IP address and port of the connecting client application name of the client username database name time of…
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
6
votes
2 answers

Extended Events - Object cannot be added to the event session

When I am trying to run Extended Event: CREATE EVENT SESSION [Loading] ON SERVER ADD EVENT sqlserver.sql_statement_completed(SET collect_statement=(1)) ADD TARGET package0.event_file(SET…
Kulis
  • 988
  • 3
  • 11
  • 25
4
votes
1 answer

SQL Server logging failed queries

I'm trying to implement a system-wide logging, which would log all failed Stored Procedure executions in our dabatase and I'm looking at Extended Events. I've done some research and it seems quite easy to capture failed statements using following…
Evaldas Buinauskas
  • 13,739
  • 11
  • 55
  • 107
3
votes
3 answers

SQL importing Extended Events file using sys.fn_xe_file_target_read_file how to only get values since last import

I am using SQL Server 2012 I have a long running extended event (runs for days to capture events) that saves to a .xel file. I have a job that runs periodically to import the data into a staging table. I am only importing the XML event_data column…
Brad
  • 3,454
  • 3
  • 27
  • 50
3
votes
2 answers

Capture Linked server queries using SQL Extended Events

I tried many event types but could not achieve logging for Linked server. I could figure out events for all other databases but no luck with linked server. Any suggestions ?
Amit Bhoyar
  • 1,007
  • 5
  • 20
3
votes
1 answer

How to stop SQL Server or take event based custom action using Extended Events feature

This is regarding SQL Server Extended Events feature which got introduced with SQL Server 2008 and got a GUI interface in version 2012. In specific to its so many wonderful features I also read it here that you can also stop the SQL Server when you…
RBT
  • 24,161
  • 21
  • 159
  • 240
3
votes
1 answer

SQL Server Extended Events doesn't have the newer events

I am querying system_health session and noticed that not all of the events are being returned. There were definitely few deadlocks today but these aren't in the output. I came across this connect filing but from the comments the issue has been…
Afroz
  • 1,017
  • 2
  • 12
  • 24
2
votes
1 answer

Filter extended events by affected table?

I am working with extended events in SQL Server 2008 to perform some monitoring. I am mostly interested in the following…
Huck
  • 23
  • 4
2
votes
1 answer

What permissions are required for Extended Events?

My server administrator has created an extended event for me, but on my account I can't start the session and use it. What permissions do I have to ask for in order to use extended events?
TK-421
  • 294
  • 1
  • 7
  • 26
2
votes
1 answer

Extended events not capturing Entity Framework queries (read/updates)

I had added the Extended event to track sql calls which is slowing down my system leading to Timeout exceptions and other CREATE EVENT SESSION [longrunning_statements] ON SERVER ADD EVENT sqlserver.sql_statement_completed( WHERE…
Moons
  • 3,833
  • 4
  • 49
  • 82
1
2 3 4 5 6 7 8