I'm running an SQL trace by calling SQL Server Profiler's system stored procedures directly. I tried using sp_trace_setstatus to stop the trace, but it didn't work. The trace running on the server still shows up in fn_trace_getinfo()'s output. How can I stop the trace?
SQL Server Books Online (BOL) documents most things well enough but does a poor job documenting Profiler and its related system stored procedures and functions. Let's walk through a simple example to demonstr...