Monitoring Database Activity with SQL Server Profiler

SQL Server Profiler (or SQL Profiler for short) is an indispensable tool that lets you see the direct commands as they are sent to the server by ADO.NET on behalf of your running application. You will use it throughout this chapter to observe database activity behind the scenes, so now is a good time to start tracing.

Launch SQL Server Profiler from the Performance Tools folder in the Microsoft SQL Server 2012 group on the Start menu. Press CTRL+N to create a new trace, and click Connect to connect to the server. SQL Profiler displays the Trace Properties dialog. Clicking Run will start the trace, but don’t click it just yet. You’ll want to tailor the trace first.

By default, SQL Profiler hides ...

Get Programming Microsoft® SQL Server® 2012 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.