SQL Server › SQL Server Profiler & Extended Events
What are Extended Events, and why are they generally recommended over SQL Server Profiler for modern monitoring needs?
BeginnerAnswer
Extended Events are a lightweight, highly configurable event tracing system built directly into the SQL Server engine, using significantly less overhead than the older Profiler tool, making them a much safer choice for monitoring busy production servers without noticeably impacting performance while capturing the events you need.
CREATE EVENT SESSION SlowQueries ON SERVER
ADD EVENT sqlserver.sql_statement_completed
(WHERE duration > 1000000)
ADD TARGET package0.event_file (SET filename = 'SlowQueries.xel');Real-world example A database administrator sets up an Extended Events session to capture only queries running longer than one second, gaining the monitoring insight they need with far less overhead than running a comparable trace in the older Profiler tool.