开发者

Running SQL Profiler in the background

I want to leave SQL Server profiler running all the time logging any query that runs for longer than 5 seconds. It's simple enough to start this using 开发者_Python百科the profiler tool on my PC but how do I create it so it runs in the background on the server?


I would recommend that you use a server side trace for this task rather than running a SQL Server Profiler trace via the GUI.

The performance overhead of running a server side trace, verses a trace via SQL Server Profiler is significantly reduced.

Take a look at the following blog post for an example of creating a server side trace:

  • SQL Server Performance Statistics Using a Server Side Trace

For detailed documentation consult SQL Server Books Online topic:

  • Introducing SQL Trace
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜