Sp_start_trace
SQL Server's Profiler utility is a powerful tool and a vast improvement over the SQL Trace facility that came with releases prior to 7.0. However, it's also a resource-intensive and sometimes painfully slow application. Because I often need to trace the activity on SQL Server in situations where I don't wish to incur the overhead of the Profiler GUI, I wrote my own set of stored procedures to manage Profiler traces. They allow you to start, stop, and list Profiler traces without actually using Profiler itself. How do they work? By calling SQL Server's sp_trace_% extended procedures, the same way that Profiler itself does. These procedures are documented in the Books Online and are considerably easier to use than previous versions. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access