user23048345
user23048345

Reputation: 3173

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 the profiler tool on my PC but how do I create it so it runs in the background on the server?

Upvotes: 3

Views: 8844

Answers (1)

John Sansom
John Sansom

Reputation: 41819

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:

For detailed documentation consult SQL Server Books Online topic:

Upvotes: 10

Related Questions