SQL Server › SQL Server Profiler & Extended Events

What is SQL Server Profiler, and what is it traditionally used for?

Beginner

Answer

SQL Server Profiler is a graphical tool that captures a detailed trace of events happening on a SQL Server instance, such as every query executed, how long each one took, and any errors encountered, historically used by developers and administrators to diagnose performance problems or understand exactly what an application is sending to the database.
-- Profiler traces are configured through its graphical interface
-- selecting specific event classes like SQL:BatchCompleted to capture
Real-world example A developer uses SQL Server Profiler to capture every query an application sends to the database during a specific user action, discovering an unexpectedly large number of redundant queries being executed for a single page load.

Common follow-ups: Is SQL Server Profiler still recommended for use on production servers today?;What has largely replaced Profiler in more recent versions of SQL Server?